1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lychee_ynh.git synced 2024-09-03 19:36:36 +02:00
* fix

* fix
This commit is contained in:
eric_G 2023-12-30 10:52:22 +01:00 committed by GitHub
parent 967686073f
commit 45a6b6231d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 59 additions and 7 deletions

View file

@ -75,13 +75,13 @@ REDIS_PASSWORD=null
REDIS_PORT=6379 REDIS_PORT=6379
MAIL_DRIVER=smtp MAIL_DRIVER=smtp
MAIL_HOST= MAIL_HOST=localhost
MAIL_PORT= MAIL_PORT=25
MAIL_USERNAME= MAIL_USERNAME=__APP__
MAIL_PASSWORD= MAIL_PASSWORD=__MAIL_PWD__
MAIL_ENCRYPTION= MAIL_ENCRYPTION=false
MAIL_FROM_NAME= MAIL_FROM_NAME=lychee
MAIL_FROM_ADDRESS= MAIL_FROM_ADDRESS=lychee@__DOMAIN__
# The trusted proxies if Lychee is behind a reverse proxy # The trusted proxies if Lychee is behind a reverse proxy
# Accepted values: # Accepted values:

View file

@ -51,6 +51,7 @@ ram.runtime = "50M"
autoupdate.strategy = "latest_github_tag" autoupdate.strategy = "latest_github_tag"
[resources.system_user] [resources.system_user]
allow_email = true
[resources.install_dir] [resources.install_dir]

View file

@ -7,6 +7,8 @@
# Composer version # Composer version
YNH_COMPOSER_VERSION="2.5.4" YNH_COMPOSER_VERSION="2.5.4"
nodejs_version=16
#================================================= #=================================================
# PERSONAL HELPERS # PERSONAL HELPERS
#================================================= #=================================================

View file

@ -19,6 +19,14 @@ fpm_usage="low"
timezone="$(cat /etc/timezone)" timezone="$(cat /etc/timezone)"
#=================================================
# INSTALL DEPENDENCIES
#=================================================
ynh_script_progression --message="Installing dependencies..." --weight=7
# Install Nodejs
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
#================================================= #=================================================
# STORE SETTINGS FROM MANIFEST # STORE SETTINGS FROM MANIFEST
#================================================= #=================================================
@ -69,6 +77,17 @@ ynh_script_progression --message="Installing app with Composer..." --weight=15
ynh_install_composer ynh_install_composer
#=================================================
# INSTALL LYCHEE
#=================================================
ynh_script_progression --message="Installing $app..." --weight=10
pushd $install_dir
ynh_use_nodejs
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_ENV=production $ynh_npm run build
popd
#================================================= #=================================================
# ADD A CONFIGURATION # ADD A CONFIGURATION
#================================================= #=================================================

View file

@ -20,6 +20,9 @@ ynh_remove_nginx_config
# Remove the dedicated PHP-FPM config # Remove the dedicated PHP-FPM config
ynh_remove_fpm_config ynh_remove_fpm_config
# Remove NodeJS
ynh_remove_nodejs
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================

View file

@ -30,6 +30,14 @@ ynh_restore_file --origin_path="$data_dir" --not_mandatory
chown -R $app:www-data "$data_dir" 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 # RESTORE THE PHP-FPM CONFIGURATION
#================================================= #=================================================

View file

@ -57,6 +57,14 @@ chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
chmod -R 755 $data_dir chmod -R 755 $data_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 # PHP-FPM CONFIGURATION
#================================================= #=================================================
@ -87,6 +95,17 @@ ynh_script_progression --message="Installing app with Composer..." --weight=1
ynh_install_composer ynh_install_composer
#=================================================
# INSTALL LYCHEE
#=================================================
ynh_script_progression --message="Installing $app..." --weight=10
pushd $install_dir
ynh_use_nodejs
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_ENV=production $ynh_npm run build
popd
#================================================= #=================================================
# BUILDING # BUILDING
#================================================= #=================================================