1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mobilizon_ynh.git synced 2024-09-03 19:46:19 +02:00

Merge branch 'testing' into feature/standalone-app

This commit is contained in:
Thomas Parisot 2021-01-19 13:09:31 +01:00 committed by GitHub
commit 12f81c0a42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 71 deletions

View file

@ -1,7 +1,7 @@
# Mobilizon for YunoHost # Mobilizon for YunoHost
[![Integration level](https://dash.yunohost.org/integration/mobilizon.svg)](https://dash.yunohost.org/appci/app/mobilizon) ![](https://ci-apps.yunohost.org/ci/badges/mobilizon.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mobilizon.maintain.svg) [![Integration level](https://dash.yunohost.org/integration/mobilizon.svg)](https://dash.yunohost.org/appci/app/mobilizon) ![](https://ci-apps.yunohost.org/ci/badges/mobilizon.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mobilizon.maintain.svg)
[![Install Mobilizon with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=mobilizon) [![Install Mobilizon with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mobilizon)
> *This package allows you to install Mobilizon quickly and simply on a YunoHost server. > *This package allows you to install Mobilizon quickly and simply on a YunoHost server.
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*

View file

@ -18,6 +18,8 @@
upgrade=1 from_commit=185cc16e516076e340cca149e8e9140a8762e22e upgrade=1 from_commit=185cc16e516076e340cca149e8e9140a8762e22e
# 0.1.0-2019-12-28~ynh1 # 0.1.0-2019-12-28~ynh1
upgrade=1 from_commit=6b77f268d4e7e2cd525e11e11f3ed5a5162d0bd2 upgrade=1 from_commit=6b77f268d4e7e2cd525e11e11f3ed5a5162d0bd2
# 1.0.0~ynh1
upgrade=1 from_commit=ac87692da6eaff71f40e3069c7bc6129eddba5e6
backup_restore=1 backup_restore=1
multi_instance=1 multi_instance=1
# This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version. # This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version.
@ -35,4 +37,5 @@ Notification=all
name=0.1.0-2019-05-15~ynh1 name=0.1.0-2019-05-15~ynh1
; commit=6b77f268d4e7e2cd525e11e11f3ed5a5162d0bd2 ; commit=6b77f268d4e7e2cd525e11e11f3ed5a5162d0bd2
name=0.1.0-2019-12-28~ynh1 name=0.1.0-2019-12-28~ynh1
; commit=ac87692da6eaff71f40e3069c7bc6129eddba5e6
name=1.0.0~ynh1

View file

@ -6,7 +6,7 @@
"en": "A decentralized and federated platform to organize events", "en": "A decentralized and federated platform to organize events",
"fr": "Une plateforme décentralisée et fédérée pour organiser des événements" "fr": "Une plateforme décentralisée et fédérée pour organiser des événements"
}, },
"version": "1.0.0~ynh1", "version": "1.0.3~ynh1",
"url": "https://joinmobilizon.org/", "url": "https://joinmobilizon.org/",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"maintainer": { "maintainer": {

View file

@ -165,6 +165,11 @@ ynh_script_progression --message="Upgrading dependencies..."
ynh_install_app_dependencies $pkg_dependencies ynh_install_app_dependencies $pkg_dependencies
if ynh_version_gt "1.0.3~ynh1" "${previous_version}" ; then
ynh_script_progression --message="Mobilizon v1.0.3: Remove previous NodeJS"
ynh_remove_nodejs
fi
#================================================= #=================================================
# CREATE DEDICATED USER # CREATE DEDICATED USER
#================================================= #=================================================
@ -191,71 +196,3 @@ chmod o-rwx $config
# Give permission to the final_path # Give permission to the final_path
chown -R "$app":"$app" "$final_path" chown -R "$app":"$app" "$final_path"
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Upgrading systemd configuration..."
# Create a dedicated systemd config
ynh_add_systemd_config --others_var="secret secret_key port domain ynh_user ynh_user_password db_user db_name db_pwd"
#=================================================
# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
ynh_script_progression --message="Securing files and directories..."
# Set permissions on app files
chown -R "$app":"$app" "$final_path"
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app --description "$app daemon for Mobilizon"
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..."
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Access Mobilizon.Web.Endpoint at"
#=================================================
# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
ynh_script_progression --message="App: running database migrations"
pushd $final_path/$app
sudo -u "$app" MIX_ENV=prod $final_path/$app/bin/mobilizon_ctl "ecto.migrate"
popd
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Upgrading SSOwat configuration..."
# Make app public if necessary
if [ $is_public -eq 1 ]
then
# unprotected_uris allows SSO credentials to be passed anyway
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
fi
#=================================================
# RELOAD NGINX
#=================================================
ynh_script_progression --message="Reloading nginx web server..."
ynh_systemd_action --service_name=nginx --action=reload
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Upgrade of $app completed"