diff --git a/conf/.env.example b/conf/.env.example index acfef3a..9888d86 100644 --- a/conf/.env.example +++ b/conf/.env.example @@ -3,7 +3,7 @@ APP_ENV=production APP_KEY= APP_DEBUG=false # This MUST contain the host name up to the Top Level Domain (tld) e.g. .com, .org etc. -APP_URL=https://__DOMAIN____PATH__ +APP_URL=https://__DOMAIN__ APP_FORCE_HTTPS=false # If using Lychee in a sub folder, specify the path after the tld here. @@ -11,7 +11,7 @@ APP_FORCE_HTTPS=false # Set APP_URL=https://lychee.test # and APP_DIR=/path/to/lychee # We (LycheeOrg) do not recommend the use of APP_DIR. -# APP_DIR= +APP_DIR=__PATH__/ # enable or disable debug bar. By default it is disabled. # Do note that this disable CSP!! diff --git a/scripts/install b/scripts/install index e62f9ab..f3201e3 100755 --- a/scripts/install +++ b/scripts/install @@ -31,11 +31,8 @@ ynh_script_progression --message="Setting up source files..." --weight=3 # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" -chmod 750 "$install_dir/bootstrap/cache" chmod -R o-rwx "$install_dir" chown -R "$app:www-data" "$install_dir" -chown -R "$app:" "$install_dir/public/sym/" -chmod -R 755 "$data_dir" #================================================= # PHP-FPM CONFIGURATION diff --git a/scripts/restore b/scripts/restore index d96cfa4..f40cfa2 100755 --- a/scripts/restore +++ b/scripts/restore @@ -10,6 +10,14 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." --weight=7 + +# Install Nodejs +ynh_exec_warn_less ynh_install_nodejs --nodejs_version="$nodejs_version" + #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -30,14 +38,6 @@ ynh_restore_file --origin_path="$data_dir" --not_mandatory chown -R "$app:www-data" "$data_dir" -#================================================= -# REINSTALL DEPENDENCIES -#================================================= -ynh_script_progression --message="Reinstalling dependencies..." --weight=7 - -# Install Nodejs -ynh_exec_warn_less ynh_install_nodejs --nodejs_version="$nodejs_version" - #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= @@ -45,9 +45,6 @@ ynh_script_progression --message="Restoring the PHP-FPM configuration..." ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -# Recreate a dedicated PHP-FPM config -ynh_add_fpm_config - ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < ./db.sql diff --git a/scripts/upgrade b/scripts/upgrade index 146b349..8728321 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -11,6 +11,14 @@ source /usr/share/yunohost/helpers timezone="$(cat /etc/timezone)" +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --weight=5 + +# Install Nodejs +ynh_exec_warn_less ynh_install_nodejs --nodejs_version="$nodejs_version" + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -19,18 +27,9 @@ ynh_script_progression --message="Upgrading source files..." --weight=4 # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" --keep=".env" #--full_replace=1 -chmod 750 "$install_dir/bootstrap/cache" chmod -R o-rwx "$install_dir" chown -R "$app:www-data" "$install_dir" -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=5 - -# Install Nodejs -ynh_exec_warn_less ynh_install_nodejs --nodejs_version="$nodejs_version" - #================================================= # PHP-FPM CONFIGURATION #=================================================