diff --git a/manifest.toml b/manifest.toml index f889544..68beaa7 100644 --- a/manifest.toml +++ b/manifest.toml @@ -23,7 +23,7 @@ multi_instance = false ldap = false sso = true disk = "50M" -ram.build = "50M" +ram.build = "100M" ram.runtime = "50M" [install] diff --git a/scripts/upgrade b/scripts/upgrade index e044d83..9525cf1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -36,19 +36,19 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --li ynh_script_progression --message="Ensuring downward compatibility..." # If fpm_footprint doesn't exist, create it -if [ -z "$fpm_footprint" ]; then +if [ -z "${fpm_footprint:-}" ]; then fpm_footprint=low ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint fi # If fpm_free_footprint doesn't exist, create it -if [ -z "$fpm_free_footprint" ]; then +if [ -z "${fpm_free_footprint:-}" ]; then fpm_free_footprint=0 ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint fi # If fpm_usage doesn't exist, create it -if [ -z "$fpm_usage" ]; then +if [ -z "${fpm_usage:-}" ]; then fpm_usage=low ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage fi @@ -62,10 +62,8 @@ then ynh_script_progression --message="Upgrading source files..." # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --keep="config/db.inc.php" + ynh_setup_source --dest_dir="$install_dir" - # Temporary workaround to fix movim.ERROR: Error: Call to undefined function GuzzleHttp\Psr7\uri_for() - #ynh_replace_string --match_string="0.3.5" --replace_string="0.4.1" --target_file="$install_dir/composer.json" fi chmod -R o-rwx "$install_dir" @@ -104,10 +102,11 @@ chown $app:$app "$install_dir/config/.env" #================================================= ynh_script_progression --message="Building Movim..." -ynh_exec_warn_less ynh_install_composer --phpversion="$phpversion" --workdir="$install_dir" -ynh_exec_warn_less ynh_composer_exec --phpversion="$phpversion" --workdir="$install_dir" --commands="config --global discard-changes true --quiet" -ynh_exec_warn_less ynh_composer_exec --phpversion="$phpversion" --workdir="$install_dir" --commands="update --no-interaction --quiet" -ynh_exec_warn_less ynh_composer_exec --phpversion="$phpversion" --workdir="$install_dir" --commands="movim:migrate --quiet" +ynh_exec_warn_less ynh_install_composer + +ynh_exec_warn_less ynh_composer_exec --commands="config --global discard-changes true --quiet" +ynh_exec_warn_less ynh_composer_exec --commands="update --no-interaction --quiet" +ynh_exec_warn_less ynh_composer_exec --commands="movim:migrate --quiet" #================================================= # START SYSTEMD SERVICE