From 65054e28167ea800c439e9230aef60465ac4f231 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 30 Dec 2023 12:02:01 +0100 Subject: [PATCH] Testing (#92) * #39 * Update upgrade * Update manifest.json * Auto-update README * Update _common.sh * Update _common.sh * Cleaning up * Fix * Create DESCRIPTION.md * Auto-update README * Create updater.sh * Update updater.sh * Create updater.yml (#42) * Update upgrade * Update upgrade * Auto-update README * Update upgrade * Update upgrade * Apply example_ynh (#43) * Auto-update README * Apply example_ynh * Auto-update README * fix missing datadir * Fix missing phpversion * Update upgrade * Update check_process Co-authored-by: yunohost-bot * Auto-update README * 4.7.0 (#50) * 4.6.2 * Auto-update README * 4.7.0 * Auto-update README * Fix PHP * Update upgrade * Update restore * Update install * Update install * Update PHP to 8.1 * Update upgrade * Update install * Fix * Update ffprobe.patch * Update install * Update install * Update upgrade Co-authored-by: yunohost-bot * Upgrade auto-updater (#58) * [autopatch] Upgrade auto-updater * Auto-update README --------- Co-authored-by: tituspijean * Update .env.example * Version 2 (#61) * v2 * fix * v2 * Update manifest.toml * Auto-update README * Fix * Auto-update README * 4.7.2 * Auto-update README * Update install * Update manifest.toml * Update _common.sh * Update install * Update install * Update .env.example * Update install * Update install * Update install * Update install * Update install * Update install * Update install * Update install * Fix * Update install * Update install * Update .env.example * Update install * Update install * Update install * Update manifest.toml * Auto-update README * remove config panel * Update manifest.toml * Auto-update README * Update upgrade * Update manifest.toml * Auto-update README * Delete app.src * Update manifest.toml * Update manifest.toml * Auto-update README * add sudir (#68) * Update manifest.toml * Auto-update README * Update manifest.toml * Update install * Update manifest.toml * Auto-update README * Auto-update README * Update upgrade * Update manifest.toml * Auto-update README * Update manifest.toml * Auto-update README * Upgrade to v4.9.1 (#74) * Upgrade to v4.9.1 * Auto-update README * Update manifest.toml * Auto-update README * Update manifest.toml * Auto-update README * Update manifest.toml * Update manifest.toml * Auto-update README * Update manifest.toml * Auto-update README * fix * 4.11.0 * Auto-update README * Upgrade to v4.11.1 (#83) * Upgrade to v4.11.1 * Auto-update README * Auto-update README * Update manifest.toml * Update manifest.toml * Auto-update README * Upgrade to v4.13.0 (#86) * Upgrade to v4.13.0 * Auto-update README * no 32bit support * cleaning * Auto-update README * Update manifest.toml * Update manifest.toml * Auto-update README * Update manifest.toml * Auto-update README * Upgrade to v5.0.2 (#91) * Upgrade to v5.0.2 * Auto-update README * Update manifest.toml * Npm (#93) * fix * fix --------- Co-authored-by: yunohost-bot Co-authored-by: yalh76 Co-authored-by: YunoHost Bot Co-authored-by: tituspijean --- README.md | 2 +- README_fr.md | 2 +- conf/.env.example | 14 +++++++------- manifest.toml | 10 +++++++--- scripts/_common.sh | 2 ++ scripts/install | 19 +++++++++++++++++++ scripts/remove | 3 +++ scripts/restore | 8 ++++++++ scripts/upgrade | 19 +++++++++++++++++++ 9 files changed, 67 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 230c892..423f5e1 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Lychee is a free photo-management tool, which runs on your server or web-space. Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely. -**Shipped version:** 5.0.1~ynh1 +**Shipped version:** 5.0.2~ynh1 **Demo:** https://lycheeorg.github.io/demo/ diff --git a/README_fr.md b/README_fr.md index 9c03fc4..9579ba1 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Lychee est un outil de gestion de photos, qui s'exécute sur votre serveur ou espace Web. Téléchargez, gérez et partagez des photos comme à partir d'une application native. Lychee est livré avec tout ce dont vous avez besoin et toutes vos photos sont stockées en toute sécurité. -**Version incluse :** 5.0.1~ynh1 +**Version incluse :** 5.0.2~ynh1 **Démo :** https://lycheeorg.github.io/demo/ diff --git a/conf/.env.example b/conf/.env.example index 4289340..efe6539 100644 --- a/conf/.env.example +++ b/conf/.env.example @@ -75,13 +75,13 @@ REDIS_PASSWORD=null REDIS_PORT=6379 MAIL_DRIVER=smtp -MAIL_HOST= -MAIL_PORT= -MAIL_USERNAME= -MAIL_PASSWORD= -MAIL_ENCRYPTION= -MAIL_FROM_NAME= -MAIL_FROM_ADDRESS= +MAIL_HOST=localhost +MAIL_PORT=25 +MAIL_USERNAME=__APP__ +MAIL_PASSWORD=__MAIL_PWD__ +MAIL_ENCRYPTION=false +MAIL_FROM_NAME=lychee +MAIL_FROM_ADDRESS=lychee@__DOMAIN__ # The trusted proxies if Lychee is behind a reverse proxy # Accepted values: diff --git a/manifest.toml b/manifest.toml index 8f4c133..9c9ff56 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Lychee" description.en = "Photo-management-system to manage and share photos" description.fr = "Système de gestion de photos pour gérer et partager des photos" -version = "5.0.1~ynh1" +version = "5.0.2~ynh1" maintainers = ["eric_G"] @@ -20,8 +20,11 @@ code = "https://github.com/LycheeOrg/Lychee" yunohost = ">= 11.2" architectures = ["arm64", "amd64"] multi_instance = true + ldap = false + sso = false + disk = "50M" ram.build = "50M" ram.runtime = "50M" @@ -43,11 +46,12 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/LycheeOrg/Lychee/archive/refs/tags/v5.0.1.tar.gz" - sha256 = "6dfdbfdfbd4e687f24e15ed6c0c8f92f64056d8c8859f052ddfee587b2cae3b5" + url = "https://github.com/LycheeOrg/Lychee/archive/refs/tags/v5.0.2.tar.gz" + sha256 = "90c08bbc826eb97f1b6b44ece3ee8e92318752e28e551af9bbb40463193dcd4a" autoupdate.strategy = "latest_github_tag" [resources.system_user] + allow_email = true [resources.install_dir] diff --git a/scripts/_common.sh b/scripts/_common.sh index 1a7049a..27567b9 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,6 +7,8 @@ # Composer version YNH_COMPOSER_VERSION="2.5.4" +nodejs_version=16 + #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index 5207195..cb20b54 100755 --- a/scripts/install +++ b/scripts/install @@ -19,6 +19,14 @@ fpm_usage="low" 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 #================================================= @@ -69,6 +77,17 @@ ynh_script_progression --message="Installing app with Composer..." --weight=15 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 #================================================= diff --git a/scripts/remove b/scripts/remove index 61db822..04e45b2 100755 --- a/scripts/remove +++ b/scripts/remove @@ -20,6 +20,9 @@ ynh_remove_nginx_config # Remove the dedicated PHP-FPM config ynh_remove_fpm_config +# Remove NodeJS +ynh_remove_nodejs + #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index 869b1ca..6f464d2 100755 --- a/scripts/restore +++ b/scripts/restore @@ -30,6 +30,14 @@ 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 #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index afe1053..e5bad4e 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -57,6 +57,14 @@ chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_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 #================================================= @@ -87,6 +95,17 @@ ynh_script_progression --message="Installing app with Composer..." --weight=1 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 #=================================================