From fda369998afdff1b782b9d6b61f0c4f4d575614d Mon Sep 17 00:00:00 2001 From: YunoHost Bot Date: Fri, 26 Jan 2024 19:14:43 +0100 Subject: [PATCH 01/41] Upgrade to v5.1.2 (#102) * Upgrade to v5.1.2 * Auto-update README --- README.md | 2 +- README_fr.md | 2 +- manifest.toml | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9ada807..ed46b53 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.1.1~ynh1 +**Shipped version:** 5.1.2~ynh1 **Demo:** https://lycheeorg.github.io/demo/ diff --git a/README_fr.md b/README_fr.md index 6ff281f..cdddbbc 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.1.1~ynh1 +**Version incluse :** 5.1.2~ynh1 **Démo :** https://lycheeorg.github.io/demo/ diff --git a/manifest.toml b/manifest.toml index 36a1536..162f00e 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.1.1~ynh1" +version = "5.1.2~ynh1" maintainers = ["eric_G"] @@ -46,8 +46,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/LycheeOrg/Lychee/archive/refs/tags/v5.1.1.tar.gz" - sha256 = "9e428ac7e0640f7021c0a3d259e167c75e5cc27be473b09439fccc7b96844608" + url = "https://github.com/LycheeOrg/Lychee/archive/refs/tags/v5.1.2.tar.gz" + sha256 = "9f5fa367e68b8a0027978082634625dbd210eefd95474fc95b11dcc506eab541" autoupdate.strategy = "latest_github_tag" [resources.system_user] From fae418a8e15167db16377a978f6fd3cca9011969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 1 Feb 2024 09:05:05 +0100 Subject: [PATCH 02/41] Update install --- scripts/install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index cb20b54..0bf2e27 100755 --- a/scripts/install +++ b/scripts/install @@ -112,6 +112,8 @@ popd # Setup custom user.css file ynh_add_config --template="user.css.example" --destination="$install_dir/public/dist/user.css" +chmod 750 "$install_dir/public/dist/user.css" +chown $app:$app "$install_dir/public/dist/user.css" #================================================= # END OF SCRIPT From 1901ba4b60b3b8f162039a3e25ad93cda9747c07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 1 Feb 2024 09:05:15 +0100 Subject: [PATCH 03/41] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 162f00e..f5d7918 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.1.2~ynh1" +version = "5.1.2~ynh2" maintainers = ["eric_G"] From a71fe75ab65fc69fa24d04dd8b68384efdc477e5 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 1 Feb 2024 08:05:19 +0000 Subject: [PATCH 04/41] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ed46b53..54f4ab0 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.1.2~ynh1 +**Shipped version:** 5.1.2~ynh2 **Demo:** https://lycheeorg.github.io/demo/ diff --git a/README_fr.md b/README_fr.md index cdddbbc..c6564e9 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.1.2~ynh1 +**Version incluse :** 5.1.2~ynh2 **Démo :** https://lycheeorg.github.io/demo/ From 1aded142ebfcbe8c9f32017151b05506ac18d390 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Tue, 13 Feb 2024 01:03:30 +0100 Subject: [PATCH 05/41] trying to fix upgrade (#105) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * trying to fix upgrade * forgotten =1 * Update tests.toml --------- Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> --- scripts/upgrade | 2 +- tests.toml | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index e5bad4e..6043b2f 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -49,7 +49,7 @@ then 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 public/dist/user.css" + ynh_setup_source --dest_dir="$install_dir" --keep=".env public/dist/user.css" --full_replace=1 fi chmod 750 "$install_dir/bootstrap/cache" diff --git a/tests.toml b/tests.toml index 91daf17..83e7358 100644 --- a/tests.toml +++ b/tests.toml @@ -2,6 +2,8 @@ test_format = 1.0 [default] - # ------------ - # Tests to run - # ------------ \ No newline at end of file + # ------------------------------- + # Commits to test upgrade from + # ------------------------------- + + test_upgrade_from.fc44c0a853aeaebb4854a3271a4d0c86a3d61bfc.name = "Upgrade from 5.1.2" \ No newline at end of file From ac44f3e38abf6a83bac87cece9d9b9f462c9aa72 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 13 Feb 2024 09:04:46 +0100 Subject: [PATCH 06/41] cleaning (#104) * cleaning * Update upgrade * break lines * SC2154 fixes * Auto-update README * fix paths * typo --------- Co-authored-by: OniriCorpe Co-authored-by: yunohost-bot --- README.md | 5 +++- README_fr.md | 4 ++- conf/ffprobe.patch | 13 --------- conf/user.css.example | 23 ---------------- doc/DESCRIPTION.md | 4 ++- doc/DESCRIPTION_fr.md | 4 ++- scripts/config | 12 ++++----- scripts/install | 52 ++++++++++++++---------------------- scripts/restore | 12 ++++----- scripts/upgrade | 62 +++++++++++++------------------------------ 10 files changed, 64 insertions(+), 127 deletions(-) delete mode 100644 conf/ffprobe.patch delete mode 100644 conf/user.css.example diff --git a/README.md b/README.md index 54f4ab0..2117373 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,10 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview -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. +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.1.2~ynh2 diff --git a/README_fr.md b/README_fr.md index c6564e9..9ae8348 100644 --- a/README_fr.md +++ b/README_fr.md @@ -16,7 +16,9 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po ## Vue d’ensemble -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é. +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.1.2~ynh2 diff --git a/conf/ffprobe.patch b/conf/ffprobe.patch deleted file mode 100644 index 37cd969..0000000 --- a/conf/ffprobe.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/vendor/lychee-org/php-exif/lib/PHPExif/Adapter/FFprobe.php b/vendor/lychee-org/php-exif/lib/PHPExif/Adapter/FFprobe.php -index 9ececfe..106eadd 100644 ---- a/vendor/lychee-org/php-exif/lib/PHPExif/Adapter/FFprobe.php -+++ b/vendor/lychee-org/php-exif/lib/PHPExif/Adapter/FFprobe.php -@@ -40,7 +40,7 @@ class FFprobe extends AdapterAbstract - * - * @var string - */ -- protected string $toolPath = ''; -+ protected string $toolPath = '/usr/bin/ffprobe'; - - /** - * @var string-e diff --git a/conf/user.css.example b/conf/user.css.example deleted file mode 100644 index b6ed836..0000000 --- a/conf/user.css.example +++ /dev/null @@ -1,23 +0,0 @@ -/* Disable the 'zoom' animation while browsing pictures */ -#imageview #image { - transition: none !important; - animation-name: none !important; - animation-duration: 0 !important; -} - -/* Hide smart albums */ -/* -[data-id="0"] { display:none; } -[data-id="s"] { display:none; } -[data-id="f"] { display:none; } -[data-id="r"] { display:none; } -*/ - -/* Make the diadnostic font bigger */ -.settings_view p, .settings_view a, .settings_view input, -.sharing_view p, .sharing_view a, .sharing_view input, .sharing_view option, -.users_view p, .users_view a, .users_view input, .users_view option, -.logs_diagnostics_view pre { - font-size: 12pt; - line-height: 14pt; -} diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index b9a1229..4da3390 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -1 +1,3 @@ -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. \ No newline at end of file +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. diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md index 9eec097..77f7c7f 100644 --- a/doc/DESCRIPTION_fr.md +++ b/doc/DESCRIPTION_fr.md @@ -1 +1,3 @@ -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é. +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é. diff --git a/scripts/config b/scripts/config index 91c2de7..06f34e2 100644 --- a/scripts/config +++ b/scripts/config @@ -15,8 +15,8 @@ ynh_abort_if_errors # RETRIEVE ARGUMENTS #================================================= -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) -current_fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) +phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion) +current_fpm_footprint=$(ynh_app_setting_get --app="$app" --key=fpm_footprint) #================================================= # SPECIFIC GETTERS FOR TOML SHORT KEY @@ -52,14 +52,14 @@ get__free_footprint() { set__fpm_footprint() { if [ "$fpm_footprint" != "specific" ] then - ynh_app_setting_set --app=$app --key=fpm_footprint --value="$fpm_footprint" + ynh_app_setting_set --app="$app" --key=fpm_footprint --value="$fpm_footprint" fi } set__fpm_free_footprint() { if [ "$fpm_footprint" = "specific" ] then - ynh_app_setting_set --app=$app --key=fpm_footprint --value="$fpm_free_footprint" + ynh_app_setting_set --app="$app" --key=fpm_footprint --value="$fpm_free_footprint" fi } @@ -89,7 +89,7 @@ ynh_app_config_validate() { ynh_app_config_apply() { _ynh_app_config_apply - ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint + ynh_add_fpm_config --phpversion="$phpversion" --usage="$fpm_usage" --footprint="$fpm_footprint" } -ynh_app_config_run $1 +ynh_app_config_run "$1" diff --git a/scripts/install b/scripts/install index 0bf2e27..e62f9ab 100755 --- a/scripts/install +++ b/scripts/install @@ -13,10 +13,6 @@ source /usr/share/yunohost/helpers # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -fpm_footprint="low" -fpm_free_footprint=0 -fpm_usage="low" - timezone="$(cat /etc/timezone)" #================================================= @@ -25,15 +21,7 @@ timezone="$(cat /etc/timezone)" 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 -#================================================= - -ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint -ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint -ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage +ynh_exec_warn_less ynh_install_nodejs --nodejs_version="$nodejs_version" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -45,9 +33,9 @@ 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 +chown -R "$app:www-data" "$install_dir" +chown -R "$app:" "$install_dir/public/sym/" +chmod -R 755 "$data_dir" #================================================= # PHP-FPM CONFIGURATION @@ -55,7 +43,7 @@ chmod -R 755 $data_dir ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint +ynh_add_fpm_config # Create a dedicated NGINX config ynh_add_nginx_config @@ -67,8 +55,8 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Creating a data directory..." --weight=1 -chgrp $app -R $install_dir/storage $install_dir/public/dist $install_dir/public/sym $data_dir/uploads -chmod -R 2775 $install_dir/storage/* $install_dir/app/* $install_dir/public/dist $install_dir/public/sym $data_dir/uploads $install_dir/bootstrap/ +chgrp "$app" -R "$install_dir/storage" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" +chmod -R 2775 "$install_dir/storage" "$install_dir/app" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" "$install_dir/bootstrap/" #================================================= # INSTALL APP WITH COMPOSER @@ -82,10 +70,10 @@ ynh_install_composer #================================================= ynh_script_progression --message="Installing $app..." --weight=10 -pushd $install_dir +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 + 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 #================================================= @@ -96,24 +84,24 @@ ynh_script_progression --message="Adding a configuration file..." ynh_add_config --template=".env.example" --destination="$install_dir/.env" chmod 400 "$install_dir/.env" -chown $app:$app "$install_dir/.env" +chown "$app:$app" "$install_dir/.env" #================================================= # BUILDING #================================================= ynh_script_progression --message="Building..." --weight=10 -pushd $install_dir - php$phpversion artisan key:generate -n --force --env - php$phpversion artisan migrate -n --force - php$phpversion artisan config:clear -n - php$phpversion artisan config:cache -n +pushd "$install_dir" + "php$phpversion" artisan key:generate -n --force --env + "php$phpversion" artisan migrate -n --force + "php$phpversion" artisan config:clear -n + "php$phpversion" artisan config:cache -n popd -# Setup custom user.css file -ynh_add_config --template="user.css.example" --destination="$install_dir/public/dist/user.css" -chmod 750 "$install_dir/public/dist/user.css" -chown $app:$app "$install_dir/public/dist/user.css" +chmod 750 "$install_dir" +chmod 750 "$install_dir/bootstrap/cache" +chmod -R o-rwx "$install_dir" +chown -R "$app:www-data" "$install_dir" #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index 6f464d2..d96cfa4 100755 --- a/scripts/restore +++ b/scripts/restore @@ -19,7 +19,7 @@ ynh_restore_file --origin_path="$install_dir" chmod 750 "$install_dir/bootstrap/cache" chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" +chown -R "$app:www-data" "$install_dir" #================================================= # RESTORE THE DATA DIRECTORY @@ -28,7 +28,7 @@ ynh_script_progression --message="Restoring the data directory..." 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 @@ -36,7 +36,7 @@ chown -R $app:www-data "$data_dir" ynh_script_progression --message="Reinstalling dependencies..." --weight=7 # Install Nodejs -ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version +ynh_exec_warn_less ynh_install_nodejs --nodejs_version="$nodejs_version" #================================================= # RESTORE THE PHP-FPM CONFIGURATION @@ -46,11 +46,11 @@ 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 --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion +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 +ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < ./db.sql #================================================= # GENERIC FINALIZATION @@ -59,7 +59,7 @@ ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./ #================================================= ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." -ynh_systemd_action --service_name=php$phpversion-fpm --action=reload +ynh_systemd_action --service_name="php$phpversion-fpm" --action=reload ynh_systemd_action --service_name=nginx --action=reload #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 6043b2f..3a59c6d 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,37 +9,14 @@ source _common.sh source /usr/share/yunohost/helpers +timezone="$(cat /etc/timezone)" + #================================================= # CHECK VERSION #================================================= upgrade_type=$(ynh_check_app_version_changed) -#================================================= -# STANDARD UPGRADE STEPS -#================================================= -# ENSURE DOWNWARD COMPATIBILITY -#================================================= -ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 - -# If fpm_footprint doesn't exist, create it -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 - 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 - fpm_usage=low - ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage -fi - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -49,13 +26,12 @@ then 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 public/dist/user.css" --full_replace=1 + ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep=".env" fi chmod 750 "$install_dir/bootstrap/cache" chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" -chmod -R 755 $data_dir +chown -R "$app:www-data" "$install_dir" #================================================= # UPGRADE DEPENDENCIES @@ -63,7 +39,7 @@ chmod -R 755 $data_dir ynh_script_progression --message="Upgrading dependencies..." --weight=5 # Install Nodejs -ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version +ynh_exec_warn_less ynh_install_nodejs --nodejs_version="$nodejs_version" #================================================= # PHP-FPM CONFIGURATION @@ -71,7 +47,7 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint +ynh_add_fpm_config # Create a dedicated NGINX config ynh_add_nginx_config @@ -81,12 +57,12 @@ ynh_add_nginx_config #================================================= # UPDATE A CONFIG FILE #================================================= -#ynh_script_progression --message="Updating a configuration file..." +ynh_script_progression --message="Updating a configuration file..." -#ynh_add_config --template=".env.example" --destination="$install_dir/.env" +ynh_add_config --template=".env.example" --destination="$install_dir/.env" -#chmod 400 "$install_dir/.env" -#chown $app:$app "$install_dir/.env" +chmod 400 "$install_dir/.env" +chown "$app:$app" "$install_dir/.env" #================================================= # INSTALL APP WITH COMPOSER @@ -100,10 +76,10 @@ ynh_install_composer #================================================= ynh_script_progression --message="Installing $app..." --weight=10 -pushd $install_dir +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 + 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 #================================================= @@ -113,17 +89,17 @@ ynh_script_progression --message="Building..." --weight=4 ynh_exec_warn_less ynh_composer_exec --commands="dump-autoload" -pushd $install_dir - php$phpversion artisan migrate -n --force - php$phpversion artisan config:clear -n - php$phpversion artisan config:cache -n - php$phpversion artisan view:clear +pushd "$install_dir" + "php$phpversion" artisan migrate -n --force + "php$phpversion" artisan config:clear -n + "php$phpversion" artisan config:cache -n + "php$phpversion" artisan view:clear popd chmod 750 "$install_dir" chmod 750 "$install_dir/bootstrap/cache" chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" +chown -R "$app:www-data" "$install_dir" #================================================= # END OF SCRIPT From 873f6ddeabdf8a75773fb244089d138c567dab90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 13 Feb 2024 09:09:23 +0100 Subject: [PATCH 07/41] remove maintenance --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index f5d7918..2552121 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ description.fr = "Système de gestion de photos pour gérer et partager des phot version = "5.1.2~ynh2" -maintainers = ["eric_G"] +maintainers = [""] [upstream] license = "MIT" From 17c490cb4534951ac8946d3a0ae1024dbc5a49f4 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 20 Apr 2024 08:47:34 +0000 Subject: [PATCH 08/41] Auto-update READMEs --- ALL_README.md | 3 ++- README.md | 2 +- README_eu.md | 52 +++++++++++++++++++++++++++++++++++++++++++++++ README_fr.md | 2 +- README_gl.md | 7 +++++-- README_zh_Hans.md | 52 +++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 113 insertions(+), 5 deletions(-) create mode 100644 README_eu.md create mode 100644 README_zh_Hans.md diff --git a/ALL_README.md b/ALL_README.md index 3d6c579..a01b345 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,6 +1,7 @@ # All available README files by language - [Read the README in English](README.md) +- [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) -- [Leggi il “README” in italiano](README_it.md) +- [阅读中文(简体)的 README](README_zh_Hans.md) diff --git a/README.md b/README.md index 9493b6b..fd19f62 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ It shall NOT be edited by hand. [![Install Lychee with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lychee) -*[Read this README is other languages.](./ALL_README.md)* +*[Read this README in other languages.](./ALL_README.md)* > *This package allows you to install Lychee quickly and simply on a YunoHost server.* > *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.* diff --git a/README_eu.md b/README_eu.md new file mode 100644 index 0000000..770619c --- /dev/null +++ b/README_eu.md @@ -0,0 +1,52 @@ + + +# Lychee YunoHost-erako + +[![Integrazio maila](https://dash.yunohost.org/integration/lychee.svg)](https://dash.yunohost.org/appci/app/lychee) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/lychee.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/lychee.maintain.svg) + +[![Instalatu Lychee YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lychee) + +*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)* + +> *Pakete honek Lychee YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.* +> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.* + +## Aurreikuspena + +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. + + +**Paketatutako bertsioa:** 5.1.2~ynh2 + +**Demoa:** + +## Pantaila-argazkiak + +![Lychee(r)en pantaila-argazkia](./doc/screenshots/screenshot.jpg) + +## Dokumentazioa eta baliabideak + +- Aplikazioaren webgune ofiziala: +- Administratzaileen dokumentazio ofiziala: +- Jatorrizko aplikazioaren kode-gordailua: +- YunoHost Denda: +- Eman errore baten berri: + +## Garatzaileentzako informazioa + +Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/lychee_ynh/tree/testing). + +`testing` abarra probatzeko, ondorengoa egin: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/lychee_ynh/tree/testing --debug +edo +sudo yunohost app upgrade lychee -u https://github.com/YunoHost-Apps/lychee_ynh/tree/testing --debug +``` + +**Informazio gehiago aplikazioaren paketatzeari buruz:** diff --git a/README_fr.md b/README_fr.md index b00f1a1..c26a11c 100644 --- a/README_fr.md +++ b/README_fr.md @@ -21,7 +21,7 @@ Téléchargez, gérez et partagez des photos comme à partir d'une application n Lychee est livré avec tout ce dont vous avez besoin et toutes vos photos sont stockées en toute sécurité. -**Version incluse :** 5.1.2~ynh2 +**Version incluse :** 5.1.2~ynh2 **Démo :** diff --git a/README_gl.md b/README_gl.md index 0feb045..a92360b 100644 --- a/README_gl.md +++ b/README_gl.md @@ -16,9 +16,12 @@ NON debe editarse manualmente. ## Vista xeral -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. +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. -**Versión proporcionada:** 5.1.2~ynh1 + +**Versión proporcionada:** 5.1.2~ynh2 **Demo:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md new file mode 100644 index 0000000..525d0bf --- /dev/null +++ b/README_zh_Hans.md @@ -0,0 +1,52 @@ + + +# YunoHost 的 Lychee + +[![集成程度](https://dash.yunohost.org/integration/lychee.svg)](https://dash.yunohost.org/appci/app/lychee) ![工作状态](https://ci-apps.yunohost.org/ci/badges/lychee.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/lychee.maintain.svg) + +[![使用 YunoHost 安装 Lychee](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lychee) + +*[阅读此 README 的其它语言版本。](./ALL_README.md)* + +> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 Lychee。* +> *如果您还没有 YunoHost,请参阅[指南](https://yunohost.org/install)了解如何安装它。* + +## 概况 + +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. + + +**分发版本:** 5.1.2~ynh2 + +**演示:** + +## 截图 + +![Lychee 的截图](./doc/screenshots/screenshot.jpg) + +## 文档与资源 + +- 官方应用网站: +- 官方管理文档: +- 上游应用代码库: +- YunoHost 商店: +- 报告 bug: + +## 开发者信息 + +请向 [`testing` 分支](https://github.com/YunoHost-Apps/lychee_ynh/tree/testing) 发送拉取请求。 + +如要尝试 `testing` 分支,请这样操作: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/lychee_ynh/tree/testing --debug +或 +sudo yunohost app upgrade lychee -u https://github.com/YunoHost-Apps/lychee_ynh/tree/testing --debug +``` + +**有关应用打包的更多信息:** From c96baaa8bd66005ab8207c963c400b4eeac728c9 Mon Sep 17 00:00:00 2001 From: YunoHost Bot Date: Sat, 20 Apr 2024 10:48:10 +0200 Subject: [PATCH 09/41] Upgrade to v5.2.1 (#108) * Upgrade to v5.2.1 * Auto-update READMEs --------- Co-authored-by: eric_G <46165813+ericgaspar@users.noreply.github.com> --- README.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- manifest.toml | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index fd19f62..46eceb6 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ 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.1.2~ynh2 +**Shipped version:** 5.2.1~ynh1 **Demo:** diff --git a/README_eu.md b/README_eu.md index 770619c..e754973 100644 --- a/README_eu.md +++ b/README_eu.md @@ -21,7 +21,7 @@ Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely. -**Paketatutako bertsioa:** 5.1.2~ynh2 +**Paketatutako bertsioa:** 5.2.1~ynh1 **Demoa:** diff --git a/README_fr.md b/README_fr.md index c26a11c..e6c95da 100644 --- a/README_fr.md +++ b/README_fr.md @@ -21,7 +21,7 @@ Téléchargez, gérez et partagez des photos comme à partir d'une application n Lychee est livré avec tout ce dont vous avez besoin et toutes vos photos sont stockées en toute sécurité. -**Version incluse :** 5.1.2~ynh2 +**Version incluse :** 5.2.1~ynh1 **Démo :** diff --git a/README_gl.md b/README_gl.md index a92360b..ad7635e 100644 --- a/README_gl.md +++ b/README_gl.md @@ -21,7 +21,7 @@ Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely. -**Versión proporcionada:** 5.1.2~ynh2 +**Versión proporcionada:** 5.2.1~ynh1 **Demo:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 525d0bf..09c5a5d 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -21,7 +21,7 @@ Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely. -**分发版本:** 5.1.2~ynh2 +**分发版本:** 5.2.1~ynh1 **演示:** diff --git a/manifest.toml b/manifest.toml index 2552121..f4ac480 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.1.2~ynh2" +version = "5.2.1~ynh1" maintainers = [""] @@ -46,8 +46,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/LycheeOrg/Lychee/archive/refs/tags/v5.1.2.tar.gz" - sha256 = "9f5fa367e68b8a0027978082634625dbd210eefd95474fc95b11dcc506eab541" + url = "https://github.com/LycheeOrg/Lychee/archive/refs/tags/v5.2.1.tar.gz" + sha256 = "1f2773aef9bcdf38662a8cd0baa9027601ae5c7f31f78426e8dcc1e042950b6e" autoupdate.strategy = "latest_github_tag" [resources.system_user] From edf8c83abe6318923d6be8a5dc702a0e1c8fd05e Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Wed, 1 May 2024 02:09:14 +0200 Subject: [PATCH 10/41] remove the empty string inside 'maintainers' --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index f4ac480..bc5ac90 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ description.fr = "Système de gestion de photos pour gérer et partager des phot version = "5.2.1~ynh1" -maintainers = [""] +maintainers = [] [upstream] license = "MIT" From a731e090665f1e3948e5b88bf1d0ede32ad7d3c5 Mon Sep 17 00:00:00 2001 From: YunoHost Bot Date: Wed, 8 May 2024 20:19:50 +0200 Subject: [PATCH 11/41] Upgrade to v5.3.0 (#110) * Upgrade to v5.3.0 * Auto-update READMEs --- README.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- manifest.toml | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 46eceb6..91a5b57 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ 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.2.1~ynh1 +**Shipped version:** 5.3.0~ynh1 **Demo:** diff --git a/README_eu.md b/README_eu.md index e754973..f22f253 100644 --- a/README_eu.md +++ b/README_eu.md @@ -21,7 +21,7 @@ Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely. -**Paketatutako bertsioa:** 5.2.1~ynh1 +**Paketatutako bertsioa:** 5.3.0~ynh1 **Demoa:** diff --git a/README_fr.md b/README_fr.md index e6c95da..8c1292c 100644 --- a/README_fr.md +++ b/README_fr.md @@ -21,7 +21,7 @@ Téléchargez, gérez et partagez des photos comme à partir d'une application n Lychee est livré avec tout ce dont vous avez besoin et toutes vos photos sont stockées en toute sécurité. -**Version incluse :** 5.2.1~ynh1 +**Version incluse :** 5.3.0~ynh1 **Démo :** diff --git a/README_gl.md b/README_gl.md index ad7635e..694e657 100644 --- a/README_gl.md +++ b/README_gl.md @@ -21,7 +21,7 @@ Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely. -**Versión proporcionada:** 5.2.1~ynh1 +**Versión proporcionada:** 5.3.0~ynh1 **Demo:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 09c5a5d..8db784a 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -21,7 +21,7 @@ Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely. -**分发版本:** 5.2.1~ynh1 +**分发版本:** 5.3.0~ynh1 **演示:** diff --git a/manifest.toml b/manifest.toml index bc5ac90..1f82594 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.2.1~ynh1" +version = "5.3.0~ynh1" maintainers = [] @@ -46,8 +46,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/LycheeOrg/Lychee/archive/refs/tags/v5.2.1.tar.gz" - sha256 = "1f2773aef9bcdf38662a8cd0baa9027601ae5c7f31f78426e8dcc1e042950b6e" + url = "https://github.com/LycheeOrg/Lychee/archive/refs/tags/v5.3.0.tar.gz" + sha256 = "eb0e519d29f3ed895d6e7f447fb3d2a2acd4b0ab81c67f3271d6ea610d1c590b" autoupdate.strategy = "latest_github_tag" [resources.system_user] From e0fee91f46b3ee5284a0d0b1b0483316f643d180 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 8 May 2024 18:19:54 +0000 Subject: [PATCH 12/41] Auto-update READMEs --- README_zh_Hans.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 8db784a..5a2717d 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -3,7 +3,7 @@ 请勿手动编辑。 --> -# YunoHost 的 Lychee +# YunoHost 上的 Lychee [![集成程度](https://dash.yunohost.org/integration/lychee.svg)](https://dash.yunohost.org/appci/app/lychee) ![工作状态](https://ci-apps.yunohost.org/ci/badges/lychee.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/lychee.maintain.svg) From 2488ab4398e90217f5de3b49f3c46d7c16b6d7dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 8 May 2024 21:15:08 +0200 Subject: [PATCH 13/41] Update upgrade --- scripts/upgrade | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 3a59c6d..fce27dd 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -11,23 +11,13 @@ source /usr/share/yunohost/helpers timezone="$(cat /etc/timezone)" -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=4 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - 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" --full_replace=1 --keep=".env" -fi +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep=".env" chmod 750 "$install_dir/bootstrap/cache" chmod -R o-rwx "$install_dir" From fadc2cccd3b812c108154f82134b7074e72096c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 9 May 2024 09:54:15 +0200 Subject: [PATCH 14/41] fix --- manifest.toml | 2 +- scripts/upgrade | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 1f82594..f8b95a6 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.3.0~ynh1" +version = "5.3.0~ynh2" maintainers = [] diff --git a/scripts/upgrade b/scripts/upgrade index fce27dd..ff782d4 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -80,6 +80,7 @@ ynh_script_progression --message="Building..." --weight=4 ynh_exec_warn_less ynh_composer_exec --commands="dump-autoload" pushd "$install_dir" + "php$phpversion" artisan key:generate -n --force --env "php$phpversion" artisan migrate -n --force "php$phpversion" artisan config:clear -n "php$phpversion" artisan config:cache -n From fd06447d510436c8e39aaa7f49900ada34265915 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 9 May 2024 07:54:21 +0000 Subject: [PATCH 15/41] Auto-update READMEs --- README.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 91a5b57..edd3756 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ 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.3.0~ynh1 +**Shipped version:** 5.3.0~ynh2 **Demo:** diff --git a/README_eu.md b/README_eu.md index f22f253..fb07a11 100644 --- a/README_eu.md +++ b/README_eu.md @@ -21,7 +21,7 @@ Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely. -**Paketatutako bertsioa:** 5.3.0~ynh1 +**Paketatutako bertsioa:** 5.3.0~ynh2 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 8c1292c..4674a19 100644 --- a/README_fr.md +++ b/README_fr.md @@ -21,7 +21,7 @@ Téléchargez, gérez et partagez des photos comme à partir d'une application n Lychee est livré avec tout ce dont vous avez besoin et toutes vos photos sont stockées en toute sécurité. -**Version incluse :** 5.3.0~ynh1 +**Version incluse :** 5.3.0~ynh2 **Démo :** diff --git a/README_gl.md b/README_gl.md index 694e657..56c9396 100644 --- a/README_gl.md +++ b/README_gl.md @@ -21,7 +21,7 @@ Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely. -**Versión proporcionada:** 5.3.0~ynh1 +**Versión proporcionada:** 5.3.0~ynh2 **Demo:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 5a2717d..32432fa 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -21,7 +21,7 @@ Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely. -**分发版本:** 5.3.0~ynh1 +**分发版本:** 5.3.0~ynh2 **演示:** From 45f321863c7fb66a0eaf3c989abd4827fcbd5104 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 2 Jun 2024 12:29:19 +0000 Subject: [PATCH 16/41] Auto-update READMEs --- ALL_README.md | 1 + README_es.md | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 README_es.md diff --git a/ALL_README.md b/ALL_README.md index a01b345..152f2e7 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,6 +1,7 @@ # All available README files by language - [Read the README in English](README.md) +- [Lea el README en español](README_es.md) - [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) diff --git a/README_es.md b/README_es.md new file mode 100644 index 0000000..852887d --- /dev/null +++ b/README_es.md @@ -0,0 +1,52 @@ + + +# Lychee para Yunohost + +[![Nivel de integración](https://dash.yunohost.org/integration/lychee.svg)](https://dash.yunohost.org/appci/app/lychee) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/lychee.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/lychee.maintain.svg) + +[![Instalar Lychee con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lychee) + +*[Leer este README en otros idiomas.](./ALL_README.md)* + +> *Este paquete le permite instalarLychee rapidamente y simplement en un servidor YunoHost.* +> *Si no tiene YunoHost, visita [the guide](https://yunohost.org/install) para aprender como instalarla.* + +## Descripción general + +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. + + +**Versión actual:** 5.3.0~ynh2 + +**Demo:** + +## Capturas + +![Captura de Lychee](./doc/screenshots/screenshot.jpg) + +## Documentaciones y recursos + +- Sitio web oficial: +- Documentación administrador oficial: +- Repositorio del código fuente oficial de la aplicación : +- Catálogo YunoHost: +- Reportar un error: + +## Información para desarrolladores + +Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/lychee_ynh/tree/testing + +Para probar la rama `testing`, sigue asÍ: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/lychee_ynh/tree/testing --debug +o +sudo yunohost app upgrade lychee -u https://github.com/YunoHost-Apps/lychee_ynh/tree/testing --debug +``` + +**Mas informaciones sobre el empaquetado de aplicaciones:** From 86728711e0ed696e3e3722075e6acb98cc1c3e78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 2 Jun 2024 14:29:51 +0200 Subject: [PATCH 17/41] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index ff782d4..146b349 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -17,7 +17,7 @@ timezone="$(cat /etc/timezone)" 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" --full_replace=1 --keep=".env" +ynh_setup_source --dest_dir="$install_dir" --keep=".env" #--full_replace=1 chmod 750 "$install_dir/bootstrap/cache" chmod -R o-rwx "$install_dir" From 662801bd8face0605d3cd7a779591719d9501e39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 9 Jun 2024 15:12:39 +0200 Subject: [PATCH 18/41] Update manifest.toml --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index f8b95a6..3342228 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.3.0~ynh2" +version = "5.3.1~ynh1" maintainers = [] @@ -46,8 +46,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/LycheeOrg/Lychee/archive/refs/tags/v5.3.0.tar.gz" - sha256 = "eb0e519d29f3ed895d6e7f447fb3d2a2acd4b0ab81c67f3271d6ea610d1c590b" + url = "https://github.com/LycheeOrg/Lychee/archive/refs/tags/v5.3.1.tar.gz" + sha256 = "4b45b2f486f2c3088aecea4682b9a5159c2b1c7657785f3580e2443c4256184e" autoupdate.strategy = "latest_github_tag" [resources.system_user] From 99a954b5f61148924137bfb60b1f5a6d2174ef59 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 9 Jun 2024 13:12:46 +0000 Subject: [PATCH 19/41] Auto-update READMEs --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index edd3756..5fc2d1b 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ 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.3.0~ynh2 +**Shipped version:** 5.3.1~ynh1 **Demo:** diff --git a/README_es.md b/README_es.md index 852887d..e8f7cdc 100644 --- a/README_es.md +++ b/README_es.md @@ -21,7 +21,7 @@ Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely. -**Versión actual:** 5.3.0~ynh2 +**Versión actual:** 5.3.1~ynh1 **Demo:** diff --git a/README_eu.md b/README_eu.md index fb07a11..78e726e 100644 --- a/README_eu.md +++ b/README_eu.md @@ -21,7 +21,7 @@ Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely. -**Paketatutako bertsioa:** 5.3.0~ynh2 +**Paketatutako bertsioa:** 5.3.1~ynh1 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 4674a19..7e84c20 100644 --- a/README_fr.md +++ b/README_fr.md @@ -21,7 +21,7 @@ Téléchargez, gérez et partagez des photos comme à partir d'une application n Lychee est livré avec tout ce dont vous avez besoin et toutes vos photos sont stockées en toute sécurité. -**Version incluse :** 5.3.0~ynh2 +**Version incluse :** 5.3.1~ynh1 **Démo :** diff --git a/README_gl.md b/README_gl.md index 56c9396..3d35914 100644 --- a/README_gl.md +++ b/README_gl.md @@ -21,7 +21,7 @@ Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely. -**Versión proporcionada:** 5.3.0~ynh2 +**Versión proporcionada:** 5.3.1~ynh1 **Demo:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 32432fa..9220f11 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -21,7 +21,7 @@ Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely. -**分发版本:** 5.3.0~ynh2 +**分发版本:** 5.3.1~ynh1 **演示:** From 0fcc31b0b35f950eecaa9884ee6962f3b267c221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 17 Jun 2024 10:11:33 +0200 Subject: [PATCH 20/41] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 3342228..30750cd 100644 --- a/manifest.toml +++ b/manifest.toml @@ -63,7 +63,7 @@ ram.runtime = "50M" main.auth_header = false [resources.apt] - packages = "mariadb-server, ffmpeg, php8.2-xml, php8.2-imagick, php8.2-bcmath, php8.2-exif, php8.2-mbstring, php8.2-gd, php8.2-mysqli, php8.2-zip, php8.2-intl" + packages = "mariadb-server, ffmpeg, php8.3-xml, php8.3-imagick, php8.3-bcmath, php8.3-exif, php8.3-mbstring, php8.3-gd, php8.3-mysqli, php8.3-zip, php8.3-intl" [resources.database] type = "mysql" From 671919429687659e9401605cf010cd26cbdcb625 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 17 Jun 2024 13:57:12 +0200 Subject: [PATCH 21/41] Debug (#116) * Update manifest.toml * Update .env.example * fix * Update upgrade * cleaning * cleaning * Update restore * cleaning * Update _common.sh * cleaning * Update upgrade --- conf/.env | 183 +++++++++++++++++++++++++++++++++++++++++++++ conf/.env.example | 94 ----------------------- manifest.toml | 4 +- scripts/_common.sh | 4 +- scripts/backup | 4 - scripts/install | 50 ++++--------- scripts/remove | 7 +- scripts/restore | 20 +---- scripts/upgrade | 42 +++-------- 9 files changed, 216 insertions(+), 192 deletions(-) create mode 100644 conf/.env delete mode 100644 conf/.env.example diff --git a/conf/.env b/conf/.env new file mode 100644 index 0000000..9888d86 --- /dev/null +++ b/conf/.env @@ -0,0 +1,183 @@ +APP_NAME=Lychee +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__ +APP_FORCE_HTTPS=false + +# If using Lychee in a sub folder, specify the path after the tld here. +# For example for https://lychee.test/path/to/lychee +# Set APP_URL=https://lychee.test +# and APP_DIR=/path/to/lychee +# We (LycheeOrg) do not recommend the use of APP_DIR. +APP_DIR=__PATH__/ + +# enable or disable debug bar. By default it is disabled. +# Do note that this disable CSP!! +DEBUGBAR_ENABLED=false + +# enable or disable the v5 layout. +LIVEWIRE_ENABLED=true + +# enable or disable log viewer. By default it is enabled. +LOG_VIEWER_ENABLED=true + +# enable s3 bucket (required in addition to needing AWS_ACCESS_KEY_ID) +# S3_ENABLED=true + +# If you spread old links of to your albums in your Lychee instance starting with +# https://lychee.text/#albumID/PhotoId +# Set this value to true to enable redirection. +LEGACY_V4_REDIRECT=false + +############################################################################## +# IMPORTANT: To migrate from Lychee v3 you *MUST* use the same MySQL/MariaDB # +# server as v3. # +############################################################################## + +# Table prefix (e.g. lychee_) of a Lychee v3 instance for migration +DB_OLD_LYCHEE_PREFIX= + +# DB_CONNECTION can be sqlite, mysql or pgsql. For sqlite the other entries are +# not required, but an existing sqlite3 database may be specified if desired. In +# this case, please use an absolute path. DB_DATABASE may be omitted but should +# *not* be left blank. +DB_CONNECTION=mysql +DB_HOST=127.0.0.1 +DB_PORT=3306 +DB_DATABASE=__DB_NAME__ +DB_USERNAME=__DB_USER__ +DB_PASSWORD=__DB_PWD__ +DB_LOG_SQL=false + +# List foreign keys in diagnostic page +DB_LIST_FOREIGN_KEYS=false + +# Application timezone. If not specified, the server's default timezone is used. +# Requires a named timezone identifier. +# See https://www.php.net/manual/en/timezones.php for the list of supported timezones. +# Don't use a timezone offset (like +01:00) or a timezone abbreviation (like CEST) +TIMEZONE=__TIMEZONE__ + +# Visibility of directories and (media) files in LYCHEE_UPLOADS +# Possible values are: +# +# - private: world group has neither read nor write access +# - public: world group has read access but no write access (the default) +# - world: world group has read and write access +# +# The default should suffice for most installations. +# For improved security, change this setting to "private". +# Some rare setups may require directories and files to be world writeable. +# In this case, use "world" here. +# USE WITH PRECAUTIONS: world writeable files and folders may be a SECURITY RISK. +# LYCHEE_IMAGE_VISIBILITY=public + +# folders in which the files will be stored +LYCHEE_UPLOADS="__DATA_DIR__/uploads/" +LYCHEE_DIST="__INSTALL_DIR__/public/dist/" +# LYCHEE_SYM="/var/www/html/Lychee-Laravel/public/sym/" +# url to access those files +# LYCHEE_UPLOADS_URL="uploads/" +# LYCHEE_DIST_URL="dist/" +# LYCHEE_SYM_URL="sym/" + +# Support for token based authentication used by API requests. Enabled by default. +# ENABLE_TOKEN_AUTH=true + +CACHE_DRIVER=file +SESSION_DRIVER=file +SESSION_LIFETIME=120 +# `sync` if jobs needs to be executed live (default) or `database` if they can be defered. +QUEUE_CONNECTION=sync + +SECURITY_HEADER_HSTS_ENABLE=false +SECURITY_HEADER_CSP_CONNECT_SRC= +SECURITY_HEADER_SCRIPT_SRC_ALLOW= +SESSION_SECURE_COOKIE=false + +REDIS_HOST=127.0.0.1 +REDIS_PASSWORD=null +REDIS_PORT=6379 + +MAIL_DRIVER=smtp +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: +# - `null`: no proxy +# - `*`: any proxy +# - [,]: a comma-seperated list of IP addresses +TRUSTED_PROXIES=null + +# Comma-separated list of class names of diagnostics checks that should be skipped. +#SKIP_DIAGNOSTICS_CHECKS= + +VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}" +VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" + +# Oauth token data +# XXX_REDIRECT_URI should be left as default unless you know exactly what you do. + +# AMAZON_SIGNIN_CLIENT_ID= +# AMAZON_SIGNIN_SECRET= +# AMAZON_SIGNIN_REDIRECT_URI=/auth/amazon/redirect + +# https://developer.okta.com/blog/2019/06/04/what-the-heck-is-sign-in-with-apple +# Note: the client secret used for "Sign In with Apple" is a JWT token that can have a maximum lifetime of 6 months. +# The article above explains how to generate the client secret on demand and you'll need to update this every 6 months. +# To generate the client secret for each request, see Generating A Client Secret For Sign In With Apple On Each Request. +# https://bannister.me/blog/generating-a-client-secret-for-sign-in-with-apple-on-each-request +# APPLE_CLIENT_ID= +# APPLE_CLIENT_SECRET= +# APPLE_REDIRECT_URI=/auth/apple/redirect + +# FACEBOOK_CLIENT_ID= +# FACEBOOK_CLIENT_SECRET= +# FACEBOOK_REDIRECT_URI=/auth/facebook/redirect + +# GITHUB_CLIENT_ID= +# GITHUB_CLIENT_SECRET= +# GITHUB_REDIRECT_URI=/auth/github/redirect + +# GOOGLE_CLIENT_ID= +# GOOGLE_CLIENT_SECRET= +# GOOGLE_REDIRECT_URI=/auth/google/redirect + +# MASTODON_DOMAIN=https://mastodon.social +# MASTODON_ID= +# MASTODON_SECRET= +# MASTODON_REDIRECT_URI=/auth/mastodon/redirect + +# MICROSOFT_CLIENT_ID= +# MICROSOFT_CLIENT_SECRET= +# MICROSOFT_REDIRECT_URI=/auth/microsoft/redirect + +# NEXTCLOUD_CLIENT_ID= +# NEXTCLOUD_CLIENT_SECRET= +# NEXTCLOUD_REDIRECT_URI=/auth/nextcloud/redirect +# NEXTCLOUD_BASE_URI= + +# KEYCLOAK_CLIENT_ID= +# KEYCLOAK_CLIENT_SECRET= +# KEYCLOAK_REDIRECT_URI=/auth/keycloak/redirect +# KEYCLOAK_BASE_URL= +# KEYCLOAK_REALM= + +# AWS support data + +# AWS_ACCESS_KEY_ID= +# AWS_SECRET_ACCESS_KEY= +# AWS_DEFAULT_REGION= +# AWS_BUCKET= +# AWS_URL= +# AWS_ENDPOINT= +# AWS_IMAGE_VISIBILITY= +# AWS_USE_PATH_STYLE_ENDPOINT= diff --git a/conf/.env.example b/conf/.env.example deleted file mode 100644 index efe6539..0000000 --- a/conf/.env.example +++ /dev/null @@ -1,94 +0,0 @@ -APP_NAME=Lychee -APP_ENV=production -APP_KEY= -APP_DEBUG=false -APP_URL=https://__DOMAIN____PATH__ -APP_FORCE_HTTPS=true - -# enable or disable debug bar. By default it is disabled. -DEBUGBAR_ENABLED=false - -############################################################################## -# IMPORTANT: To migrate from Lychee v3 you *MUST* use the same MySQL/MariaDB # -# server as v3. # -############################################################################## - -# Table prefix (e.g. lychee_) of a Lychee v3 instance for migration -DB_OLD_LYCHEE_PREFIX= - -# DB_CONNECTION can be sqlite, mysql or pgsql. For sqlite the other entries are -# not required, but an existing sqlite3 database may be specified if desired. In -# this case, please use an absolute path. DB_DATABASE may be omitted but should -# *not* be left blank. -DB_CONNECTION=mysql -DB_HOST=127.0.0.1 -DB_PORT=3306 -DB_DATABASE=__DB_NAME__ -DB_USERNAME=__DB_USER__ -DB_PASSWORD=__DB_PWD__ -DB_LOG_SQL=false - -# List foreign keys in diagnostic page -#DB_LIST_FOREIGN_KEYS=true - -# Application timezone. If not specified, the server's default timezone is used. -# Requires a named timezone identifier. -# See https://www.php.net/manual/en/timezones.php for the list of supported timezones. -# Don't use a timezone offset (like +01:00) or a timezone abbreviation (like CEST) -TIMEZONE=__TIMEZONE__ - -# Visibility of directories and (media) files in LYCHEE_UPLOADS -# Possible values are: -# -# - private: world group has neither read nor write access -# - public: world group has read access but no write access (the default) -# - world: world group has read and write access -# -# The default should suffice for most installations. -# For improved security, change this setting to "private". -# Some rare setups may require directories and files to be world writeable. -# In this case, use "world" here. -# USE WITH PRECAUTIONS: world writeable files and folders may be a SECURITY RISK. -LYCHEE_IMAGE_VISIBILITY=public - -# folders in which the files will be stored -LYCHEE_UPLOADS="__DATA_DIR__/uploads/" -LYCHEE_DIST="__INSTALL_DIR__/public/dist/" -# LYCHEE_SYM="/var/www/html/Lychee-Laravel/public/sym/" -# url to access those files -# LYCHEE_UPLOADS_URL="uploads/" -# LYCHEE_DIST_URL="dist/" -# LYCHEE_SYM_URL="sym/" - -# Support for token based authentication used by API requests. Enabled by default. -ENABLE_TOKEN_AUTH=false - -CACHE_DRIVER=file -SESSION_DRIVER=file -SESSION_LIFETIME=120 - -SECURITY_HEADER_HSTS_ENABLE=false -SESSION_SECURE_COOKIE=false - -REDIS_HOST=127.0.0.1 -REDIS_PASSWORD=null -REDIS_PORT=6379 - -MAIL_DRIVER=smtp -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: -# - `null`: no proxy -# - `*`: any proxy -# - [,]: a comma-seperated list of IP addresses -TRUSTED_PROXIES=null - -# Comma-separated list of class names of diagnostics checks that should be skipped. -#SKIP_DIAGNOSTICS_CHECKS= diff --git a/manifest.toml b/manifest.toml index 30750cd..6060482 100644 --- a/manifest.toml +++ b/manifest.toml @@ -46,8 +46,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/LycheeOrg/Lychee/archive/refs/tags/v5.3.1.tar.gz" - sha256 = "4b45b2f486f2c3088aecea4682b9a5159c2b1c7657785f3580e2443c4256184e" + url = "https://github.com/LycheeOrg/Lychee/releases/download/v5.3.1/Lychee.zip" + sha256 = "c73430882a63120ccdd0f0d2cdd8a09da70340e7dd484212e7b7fd8811c064f2" autoupdate.strategy = "latest_github_tag" [resources.system_user] diff --git a/scripts/_common.sh b/scripts/_common.sh index 27567b9..6381490 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,9 +5,7 @@ #================================================= # Composer version -YNH_COMPOSER_VERSION="2.5.4" - -nodejs_version=16 +YNH_COMPOSER_VERSION="2.7.7" #================================================= # PERSONAL HELPERS diff --git a/scripts/backup b/scripts/backup index 60cea71..a5522cf 100755 --- a/scripts/backup +++ b/scripts/backup @@ -33,10 +33,6 @@ ynh_backup --src_path="$data_dir" --is_big ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# BACKUP THE PHP-FPM CONFIGURATION -#================================================= - ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" #================================================= diff --git a/scripts/install b/scripts/install index e62f9ab..e9b7f73 100755 --- a/scripts/install +++ b/scripts/install @@ -10,19 +10,11 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# RETRIEVE ARGUMENTS FROM THE MANIFEST +# INITIALIZE AND STORE SETTINGS #================================================= 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" - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -31,16 +23,23 @@ 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 +# APP INITIAL CONFIGURATION #================================================= -ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 +ynh_script_progression --message="Adding $app's configuration files..." --weight=1 + +ynh_add_config --template=".env" --destination="$install_dir/.env" + +chmod 400 "$install_dir/.env" +chown "$app:$app" "$install_dir/.env" + +#================================================= +# SYSTEM CONFIGURATION +#================================================= +ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 # Create a dedicated PHP-FPM config ynh_add_fpm_config @@ -65,31 +64,10 @@ 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 -#================================================= -ynh_script_progression --message="Adding a configuration file..." - -ynh_add_config --template=".env.example" --destination="$install_dir/.env" - -chmod 400 "$install_dir/.env" -chown "$app:$app" "$install_dir/.env" - #================================================= # BUILDING #================================================= -ynh_script_progression --message="Building..." --weight=10 +ynh_script_progression --message="configuring $app..." --weight=10 pushd "$install_dir" "php$phpversion" artisan key:generate -n --force --env diff --git a/scripts/remove b/scripts/remove index 04e45b2..5b17c2d 100755 --- a/scripts/remove +++ b/scripts/remove @@ -10,9 +10,9 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# REMOVE NGINX CONFIGURATION +# REMOVE SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 +ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 # Remove the dedicated NGINX config ynh_remove_nginx_config @@ -20,9 +20,6 @@ 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 d96cfa4..11bafb0 100755 --- a/scripts/restore +++ b/scripts/restore @@ -17,37 +17,25 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" -chmod 750 "$install_dir/bootstrap/cache" chmod -R o-rwx "$install_dir" chown -R "$app:www-data" "$install_dir" #================================================= # RESTORE THE DATA DIRECTORY #================================================= -ynh_script_progression --message="Restoring the data directory..." +ynh_script_progression --message="Restoring the data directory..." --weight=1 ynh_restore_file --origin_path="$data_dir" --not_mandatory chown -R "$app:www-data" "$data_dir" #================================================= -# REINSTALL DEPENDENCIES +# RESTORE SYSTEM CONFIGURATIONS #================================================= -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 -#================================================= -ynh_script_progression --message="Restoring the PHP-FPM configuration..." +ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 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 @@ -57,7 +45,7 @@ ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name #================================================= # RELOAD NGINX AND PHP-FPM #================================================= -ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." +ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=1 ynh_systemd_action --service_name="php$phpversion-fpm" --action=reload ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index 146b349..858f093 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -17,24 +17,25 @@ timezone="$(cat /etc/timezone)" 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 +ynh_setup_source --dest_dir="$install_dir" --keep=".env public/uploads/ public/dist/user.css" --full_replace=1 -chmod 750 "$install_dir/bootstrap/cache" chmod -R o-rwx "$install_dir" chown -R "$app:www-data" "$install_dir" #================================================= -# UPGRADE DEPENDENCIES +# UPDATE A CONFIG FILE #================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=5 +ynh_script_progression --message="Updating a configuration file..." --weight=1 -# Install Nodejs -ynh_exec_warn_less ynh_install_nodejs --nodejs_version="$nodejs_version" +ynh_add_config --template=".env" --destination="$install_dir/.env" + +chmod 400 "$install_dir/.env" +chown "$app:$app" "$install_dir/.env" #================================================= -# PHP-FPM CONFIGURATION +# REAPPLY SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 +ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 # Create a dedicated PHP-FPM config ynh_add_fpm_config @@ -42,18 +43,6 @@ ynh_add_fpm_config # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# SPECIFIC UPGRADE -#================================================= -# UPDATE A CONFIG FILE -#================================================= -ynh_script_progression --message="Updating a configuration file..." - -ynh_add_config --template=".env.example" --destination="$install_dir/.env" - -chmod 400 "$install_dir/.env" -chown "$app:$app" "$install_dir/.env" - #================================================= # INSTALL APP WITH COMPOSER #================================================= @@ -61,21 +50,10 @@ 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 #================================================= -ynh_script_progression --message="Building..." --weight=4 +ynh_script_progression --message="Configuring $app..." --weight=4 ynh_exec_warn_less ynh_composer_exec --commands="dump-autoload" From bc78a392dfd5bbad19926c251c5e16688947a348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 17 Jun 2024 22:34:27 +0200 Subject: [PATCH 22/41] Update manifest.toml --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 6060482..357446a 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.3.1~ynh1" +version = "5.4.0~ynh1" maintainers = [] @@ -46,8 +46,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/LycheeOrg/Lychee/releases/download/v5.3.1/Lychee.zip" - sha256 = "c73430882a63120ccdd0f0d2cdd8a09da70340e7dd484212e7b7fd8811c064f2" + url = "https://github.com/LycheeOrg/Lychee/releases/download/v5.4.0/Lychee.zip" + sha256 = "bdee8831cd5564ab1e691eaf51dba9b176a977be39eb39d5dcceab1064b82c61" autoupdate.strategy = "latest_github_tag" [resources.system_user] From 316a49527ff33dc9218a2167cc28714ba65ba1c3 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 17 Jun 2024 20:34:31 +0000 Subject: [PATCH 23/41] Auto-update READMEs --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5fc2d1b..c000f59 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ 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.3.1~ynh1 +**Shipped version:** 5.4.0~ynh1 **Demo:** diff --git a/README_es.md b/README_es.md index e8f7cdc..14a8409 100644 --- a/README_es.md +++ b/README_es.md @@ -21,7 +21,7 @@ Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely. -**Versión actual:** 5.3.1~ynh1 +**Versión actual:** 5.4.0~ynh1 **Demo:** diff --git a/README_eu.md b/README_eu.md index 78e726e..cd53031 100644 --- a/README_eu.md +++ b/README_eu.md @@ -21,7 +21,7 @@ Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely. -**Paketatutako bertsioa:** 5.3.1~ynh1 +**Paketatutako bertsioa:** 5.4.0~ynh1 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 7e84c20..f2978f4 100644 --- a/README_fr.md +++ b/README_fr.md @@ -21,7 +21,7 @@ Téléchargez, gérez et partagez des photos comme à partir d'une application n Lychee est livré avec tout ce dont vous avez besoin et toutes vos photos sont stockées en toute sécurité. -**Version incluse :** 5.3.1~ynh1 +**Version incluse :** 5.4.0~ynh1 **Démo :** diff --git a/README_gl.md b/README_gl.md index 3d35914..4f51d1b 100644 --- a/README_gl.md +++ b/README_gl.md @@ -21,7 +21,7 @@ Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely. -**Versión proporcionada:** 5.3.1~ynh1 +**Versión proporcionada:** 5.4.0~ynh1 **Demo:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 9220f11..d570ec8 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -21,7 +21,7 @@ Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely. -**分发版本:** 5.3.1~ynh1 +**分发版本:** 5.4.0~ynh1 **演示:** From 385817b7e5f3c39b51bdf90e5be2202a4abbcf17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 18 Jun 2024 22:14:49 +0200 Subject: [PATCH 24/41] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index e9b7f73..d9d5731 100755 --- a/scripts/install +++ b/scripts/install @@ -24,7 +24,7 @@ ynh_script_progression --message="Setting up source files..." --weight=3 ynh_setup_source --dest_dir="$install_dir" chmod -R o-rwx "$install_dir" -chown -R "$app:www-data" "$install_dir" +chown -R "$app:$app" "$install_dir" #================================================= # APP INITIAL CONFIGURATION From 79c53163ae66a1e2a53bb00a5658df954613c74c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 18 Jun 2024 22:15:33 +0200 Subject: [PATCH 25/41] Update upgrade --- scripts/upgrade | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 858f093..ffbbfe4 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,7 +20,7 @@ ynh_script_progression --message="Upgrading source files..." --weight=4 ynh_setup_source --dest_dir="$install_dir" --keep=".env public/uploads/ public/dist/user.css" --full_replace=1 chmod -R o-rwx "$install_dir" -chown -R "$app:www-data" "$install_dir" +chown -R "$app:$app" "$install_dir" #================================================= # UPDATE A CONFIG FILE @@ -43,6 +43,14 @@ ynh_add_fpm_config # Create a dedicated NGINX config ynh_add_nginx_config +#================================================= +# CREATE DATA DIRECTORY +#================================================= +ynh_script_progression --message="Creating a data directory..." --weight=1 + +chgrp "$app" -R "$install_dir/storage" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" +chmod -R 2775 "$install_dir/storage" "$install_dir/app" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" "$install_dir/bootstrap/" + #================================================= # INSTALL APP WITH COMPOSER #================================================= From ed8b7afe6116a5a18bb1a8dca6fad9e72477f032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 18 Jun 2024 22:16:51 +0200 Subject: [PATCH 26/41] clear --- scripts/install | 5 ----- scripts/upgrade | 5 ----- 2 files changed, 10 deletions(-) diff --git a/scripts/install b/scripts/install index d9d5731..cea20a8 100755 --- a/scripts/install +++ b/scripts/install @@ -76,11 +76,6 @@ pushd "$install_dir" "php$phpversion" artisan config:cache -n popd -chmod 750 "$install_dir" -chmod 750 "$install_dir/bootstrap/cache" -chmod -R o-rwx "$install_dir" -chown -R "$app:www-data" "$install_dir" - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index ffbbfe4..74fed19 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -73,11 +73,6 @@ pushd "$install_dir" "php$phpversion" artisan view:clear popd -chmod 750 "$install_dir" -chmod 750 "$install_dir/bootstrap/cache" -chmod -R o-rwx "$install_dir" -chown -R "$app:www-data" "$install_dir" - #================================================= # END OF SCRIPT #================================================= From 51a8206897a915ccaf59ec3bb8692b3f00fe1c0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 18 Jun 2024 22:25:23 +0200 Subject: [PATCH 27/41] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 357446a..bc765a1 100644 --- a/manifest.toml +++ b/manifest.toml @@ -51,7 +51,7 @@ ram.runtime = "50M" autoupdate.strategy = "latest_github_tag" [resources.system_user] - allow_email = true + #allow_email = true [resources.install_dir] From 11f81462bc277d1af8b089bbadab7e6690be83bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 18 Jun 2024 22:27:15 +0200 Subject: [PATCH 28/41] for debug --- conf/.env | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/conf/.env b/conf/.env index 9888d86..e5eb143 100644 --- a/conf/.env +++ b/conf/.env @@ -101,14 +101,14 @@ REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379 -MAIL_DRIVER=smtp -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__ +#MAIL_DRIVER=smtp +#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: From 2747e119c16bf99dbdfb97c71ae31fc034a05aa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 18 Jun 2024 22:28:23 +0200 Subject: [PATCH 29/41] Update .env --- conf/.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/.env b/conf/.env index e5eb143..694f35b 100644 --- a/conf/.env +++ b/conf/.env @@ -105,7 +105,7 @@ REDIS_PORT=6379 #MAIL_HOST=localhost #MAIL_PORT=25 #MAIL_USERNAME=__APP__ -#MAIL_PASSWORD=__MAIL_PWD__ +#MAIL_PASSWORD= #MAIL_ENCRYPTION=false #MAIL_FROM_NAME=lychee #MAIL_FROM_ADDRESS=lychee@__DOMAIN__ From 3df4d239d2388920f5d991931d171b2d1409e5de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 18 Jun 2024 22:31:25 +0200 Subject: [PATCH 30/41] Update install --- scripts/install | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/install b/scripts/install index cea20a8..d9d5731 100755 --- a/scripts/install +++ b/scripts/install @@ -76,6 +76,11 @@ pushd "$install_dir" "php$phpversion" artisan config:cache -n popd +chmod 750 "$install_dir" +chmod 750 "$install_dir/bootstrap/cache" +chmod -R o-rwx "$install_dir" +chown -R "$app:www-data" "$install_dir" + #================================================= # END OF SCRIPT #================================================= From 6120370d3cdb4c93ff849b7bc16c2ff77456c28d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 18 Jun 2024 22:41:33 +0200 Subject: [PATCH 31/41] Update install --- scripts/install | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index d9d5731..7fde590 100755 --- a/scripts/install +++ b/scripts/install @@ -24,7 +24,7 @@ ynh_script_progression --message="Setting up source files..." --weight=3 ynh_setup_source --dest_dir="$install_dir" chmod -R o-rwx "$install_dir" -chown -R "$app:$app" "$install_dir" +chown -R "$app:www-data" "$install_dir" #================================================= # APP INITIAL CONFIGURATION @@ -54,8 +54,8 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Creating a data directory..." --weight=1 -chgrp "$app" -R "$install_dir/storage" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" -chmod -R 2775 "$install_dir/storage" "$install_dir/app" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" "$install_dir/bootstrap/" +#chgrp "$app" -R "$install_dir/storage" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" +#chmod -R 2775 "$install_dir/storage" "$install_dir/app" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" "$install_dir/bootstrap/" #================================================= # INSTALL APP WITH COMPOSER @@ -76,10 +76,9 @@ pushd "$install_dir" "php$phpversion" artisan config:cache -n popd -chmod 750 "$install_dir" -chmod 750 "$install_dir/bootstrap/cache" -chmod -R o-rwx "$install_dir" chown -R "$app:www-data" "$install_dir" +chgrp "$app" -R "$install_dir/storage" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" +chmod -R 2775 "$install_dir/storage" "$install_dir/app" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" "$install_dir/bootstrap/" #================================================= # END OF SCRIPT From 41843fc62f1db5244ed4e1946203a9b5e4533094 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 18 Jun 2024 23:12:33 +0200 Subject: [PATCH 32/41] fix --- conf/extra_php-fpm.conf | 4 ++++ scripts/install | 11 ----------- scripts/upgrade | 17 ++++++----------- 3 files changed, 10 insertions(+), 22 deletions(-) diff --git a/conf/extra_php-fpm.conf b/conf/extra_php-fpm.conf index 1f6b70e..03371cb 100644 --- a/conf/extra_php-fpm.conf +++ b/conf/extra_php-fpm.conf @@ -2,3 +2,7 @@ php_admin_value[upload_max_filesize] = 1G php_admin_value[post_max_size] = 1G +php_admin_value[max_execution_time] = 200 +php_admin_value[upload_max_size] = 100M +php_admin_value[memory_limit]= 256M + diff --git a/scripts/install b/scripts/install index 7fde590..983ef31 100755 --- a/scripts/install +++ b/scripts/install @@ -23,7 +23,6 @@ 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 -R o-rwx "$install_dir" chown -R "$app:www-data" "$install_dir" #================================================= @@ -47,16 +46,6 @@ ynh_add_fpm_config # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# SPECIFIC SETUP -#================================================= -# CREATE DATA DIRECTORY -#================================================= -ynh_script_progression --message="Creating a data directory..." --weight=1 - -#chgrp "$app" -R "$install_dir/storage" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" -#chmod -R 2775 "$install_dir/storage" "$install_dir/app" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" "$install_dir/bootstrap/" - #================================================= # INSTALL APP WITH COMPOSER #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 74fed19..63bf9b1 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -17,10 +17,9 @@ timezone="$(cat /etc/timezone)" 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 public/uploads/ public/dist/user.css" --full_replace=1 +ynh_setup_source --dest_dir="$install_dir" --keep=".env public/uploads/" --full_replace=1 -chmod -R o-rwx "$install_dir" -chown -R "$app:$app" "$install_dir" +chown -R "$app:www-data" "$install_dir" #================================================= # UPDATE A CONFIG FILE @@ -43,14 +42,6 @@ ynh_add_fpm_config # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# CREATE DATA DIRECTORY -#================================================= -ynh_script_progression --message="Creating a data directory..." --weight=1 - -chgrp "$app" -R "$install_dir/storage" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" -chmod -R 2775 "$install_dir/storage" "$install_dir/app" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" "$install_dir/bootstrap/" - #================================================= # INSTALL APP WITH COMPOSER #================================================= @@ -73,6 +64,10 @@ pushd "$install_dir" "php$phpversion" artisan view:clear popd +chown -R "$app:www-data" "$install_dir" +chgrp "$app" -R "$install_dir/storage" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" +chmod -R 2775 "$install_dir/storage" "$install_dir/app" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" "$install_dir/bootstrap/" + #================================================= # END OF SCRIPT #================================================= From 8d6d4692a44061ab6ceea18dc733bbfa8f6f5049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 18 Jun 2024 23:13:52 +0200 Subject: [PATCH 33/41] Update .env --- conf/.env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/.env b/conf/.env index 694f35b..48f9762 100644 --- a/conf/.env +++ b/conf/.env @@ -15,7 +15,7 @@ APP_DIR=__PATH__/ # enable or disable debug bar. By default it is disabled. # Do note that this disable CSP!! -DEBUGBAR_ENABLED=false +DEBUGBAR_ENABLED=true # enable or disable the v5 layout. LIVEWIRE_ENABLED=true @@ -77,7 +77,7 @@ TIMEZONE=__TIMEZONE__ # folders in which the files will be stored LYCHEE_UPLOADS="__DATA_DIR__/uploads/" LYCHEE_DIST="__INSTALL_DIR__/public/dist/" -# LYCHEE_SYM="/var/www/html/Lychee-Laravel/public/sym/" +LYCHEE_SYM="__INSTALL_DIR__/public/sym/" # url to access those files # LYCHEE_UPLOADS_URL="uploads/" # LYCHEE_DIST_URL="dist/" From c567e6ade3696f3fb769810d3df71901bd9ed629 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 18 Jun 2024 23:32:41 +0200 Subject: [PATCH 34/41] fix --- scripts/install | 1 + scripts/upgrade | 1 + 2 files changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index 983ef31..04d3c30 100755 --- a/scripts/install +++ b/scripts/install @@ -66,6 +66,7 @@ pushd "$install_dir" popd chown -R "$app:www-data" "$install_dir" +chmod -R 775 /home/yunohost.app/lychee/ chgrp "$app" -R "$install_dir/storage" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" chmod -R 2775 "$install_dir/storage" "$install_dir/app" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" "$install_dir/bootstrap/" diff --git a/scripts/upgrade b/scripts/upgrade index 63bf9b1..48c340f 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -65,6 +65,7 @@ pushd "$install_dir" popd chown -R "$app:www-data" "$install_dir" +chmod -R 775 /home/yunohost.app/lychee/ chgrp "$app" -R "$install_dir/storage" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" chmod -R 2775 "$install_dir/storage" "$install_dir/app" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" "$install_dir/bootstrap/" From 62ad7a18b80fb65bfc608916da9818f17b7dfe4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 18 Jun 2024 23:37:45 +0200 Subject: [PATCH 35/41] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index bc765a1..357446a 100644 --- a/manifest.toml +++ b/manifest.toml @@ -51,7 +51,7 @@ ram.runtime = "50M" autoupdate.strategy = "latest_github_tag" [resources.system_user] - #allow_email = true + allow_email = true [resources.install_dir] From 37f21757274c75e059061619aef22dfa97e2e376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 18 Jun 2024 23:38:42 +0200 Subject: [PATCH 36/41] Update .env --- conf/.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/.env b/conf/.env index 48f9762..5342985 100644 --- a/conf/.env +++ b/conf/.env @@ -105,7 +105,7 @@ REDIS_PORT=6379 #MAIL_HOST=localhost #MAIL_PORT=25 #MAIL_USERNAME=__APP__ -#MAIL_PASSWORD= +#MAIL_PASSWORD=__MAIL_PWD__ #MAIL_ENCRYPTION=false #MAIL_FROM_NAME=lychee #MAIL_FROM_ADDRESS=lychee@__DOMAIN__ From 04e0c15fbacdcd4bab3828e4c6f3847d88a60316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 18 Jun 2024 23:39:00 +0200 Subject: [PATCH 37/41] Update .env --- conf/.env | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/conf/.env b/conf/.env index 5342985..e257a54 100644 --- a/conf/.env +++ b/conf/.env @@ -101,14 +101,14 @@ REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379 -#MAIL_DRIVER=smtp -#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__ +MAIL_DRIVER=smtp +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: From 759b231cc9762730f3af8f63b20d4fa37f97c29a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 18 Jun 2024 23:52:12 +0200 Subject: [PATCH 38/41] fix --- scripts/install | 1 + scripts/upgrade | 1 + 2 files changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index 04d3c30..5bd306b 100755 --- a/scripts/install +++ b/scripts/install @@ -23,6 +23,7 @@ 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 o-rwx "$install_dir" chown -R "$app:www-data" "$install_dir" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 48c340f..06998f8 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -19,6 +19,7 @@ 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 public/uploads/" --full_replace=1 +chmod o-rwx "$install_dir" chown -R "$app:www-data" "$install_dir" #================================================= From 98ad6063bd7b8d1a92584ce5ecb19a28d62ce8c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 19 Jun 2024 00:23:43 +0200 Subject: [PATCH 39/41] fix --- scripts/install | 2 +- scripts/restore | 5 +++++ scripts/upgrade | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 5bd306b..ee078e3 100755 --- a/scripts/install +++ b/scripts/install @@ -67,7 +67,7 @@ pushd "$install_dir" popd chown -R "$app:www-data" "$install_dir" -chmod -R 775 /home/yunohost.app/lychee/ +chmod -R 775 /home/yunohost.app/$app/ chgrp "$app" -R "$install_dir/storage" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" chmod -R 2775 "$install_dir/storage" "$install_dir/app" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" "$install_dir/bootstrap/" diff --git a/scripts/restore b/scripts/restore index 11bafb0..7061c6c 100755 --- a/scripts/restore +++ b/scripts/restore @@ -19,6 +19,8 @@ ynh_restore_file --origin_path="$install_dir" chmod -R o-rwx "$install_dir" chown -R "$app:www-data" "$install_dir" +chgrp "$app" -R "$install_dir/storage" "$install_dir/public/dist" "$install_dir/public/sym" +chmod -R 2775 "$install_dir/storage" "$install_dir/app" "$install_dir/public/dist" "$install_dir/public/sym" "$install_dir/bootstrap/" #================================================= # RESTORE THE DATA DIRECTORY @@ -27,7 +29,10 @@ ynh_script_progression --message="Restoring the data directory..." --weight=1 ynh_restore_file --origin_path="$data_dir" --not_mandatory +chmod -R 775 "$data_dir" chown -R "$app:www-data" "$data_dir" +chgrp "$app" -R "$data_dir/uploads" +chmod -R 2775 "$data_dir/uploads" #================================================= # RESTORE SYSTEM CONFIGURATIONS diff --git a/scripts/upgrade b/scripts/upgrade index 06998f8..958519f 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -66,7 +66,7 @@ pushd "$install_dir" popd chown -R "$app:www-data" "$install_dir" -chmod -R 775 /home/yunohost.app/lychee/ +chmod -R 775 /home/yunohost.app/$app/ chgrp "$app" -R "$install_dir/storage" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" chmod -R 2775 "$install_dir/storage" "$install_dir/app" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" "$install_dir/bootstrap/" From 1203a597ec5979b223f7c7202f424ac0107fa85e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 19 Jun 2024 11:21:28 +0200 Subject: [PATCH 40/41] Update .env --- conf/.env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/.env b/conf/.env index e257a54..9f13d68 100644 --- a/conf/.env +++ b/conf/.env @@ -15,13 +15,13 @@ APP_DIR=__PATH__/ # enable or disable debug bar. By default it is disabled. # Do note that this disable CSP!! -DEBUGBAR_ENABLED=true +DEBUGBAR_ENABLED=false # enable or disable the v5 layout. LIVEWIRE_ENABLED=true # enable or disable log viewer. By default it is enabled. -LOG_VIEWER_ENABLED=true +LOG_VIEWER_ENABLED=false # enable s3 bucket (required in addition to needing AWS_ACCESS_KEY_ID) # S3_ENABLED=true From 67fdbfff354a2425161f6acd151f41da14773ab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 19 Jun 2024 15:10:40 +0200 Subject: [PATCH 41/41] cleaning --- conf/extra_php-fpm.conf | 2 +- scripts/backup | 2 +- scripts/restore | 9 +++++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/conf/extra_php-fpm.conf b/conf/extra_php-fpm.conf index 03371cb..fe6403d 100644 --- a/conf/extra_php-fpm.conf +++ b/conf/extra_php-fpm.conf @@ -3,6 +3,6 @@ php_admin_value[upload_max_filesize] = 1G php_admin_value[post_max_size] = 1G php_admin_value[max_execution_time] = 200 -php_admin_value[upload_max_size] = 100M +php_admin_value[upload_max_size] = 1G php_admin_value[memory_limit]= 256M diff --git a/scripts/backup b/scripts/backup index a5522cf..c1767e6 100755 --- a/scripts/backup +++ b/scripts/backup @@ -28,7 +28,7 @@ ynh_backup --src_path="$install_dir" ynh_backup --src_path="$data_dir" --is_big #================================================= -# BACKUP THE NGINX CONFIGURATION +# SYSTEM CONFIGURATION #================================================= ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" diff --git a/scripts/restore b/scripts/restore index 7061c6c..f9dea4d 100755 --- a/scripts/restore +++ b/scripts/restore @@ -34,6 +34,13 @@ chown -R "$app:www-data" "$data_dir" chgrp "$app" -R "$data_dir/uploads" chmod -R 2775 "$data_dir/uploads" +#================================================= +# RESTORE THE MYSQL DATABASE +#================================================= +ynh_script_progression --message="Restoring the MySQL database..." --weight=1 + +ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < ./db.sql + #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= @@ -43,8 +50,6 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" 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 - #================================================= # GENERIC FINALIZATION #=================================================