1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lychee_ynh.git synced 2024-09-03 19:36:36 +02:00
This commit is contained in:
Éric Gaspar 2024-06-17 10:32:45 +02:00
parent e6be6bbfb1
commit 07f61631b4
4 changed files with 18 additions and 25 deletions

View file

@ -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!!

View file

@ -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

View file

@ -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

View file

@ -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
#=================================================