From 20dbfae967c92790468ad969155acd9f2f7b9f12 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 12 Aug 2022 13:04:30 +0000 Subject: [PATCH 01/20] Auto-update README --- README.md | 1 + README_fr.md | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6453b2c..36c01ae 100755 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ Castopod is currently in beta but already quite stable and used by podcasters ar **Shipped version:** 1.0.0-99~ynh2 + **Demo:** https://podcast.podlibre.org/@podlibre_fr ## Screenshots diff --git a/README_fr.md b/README_fr.md index b6c6124..2f3c5e5 100755 --- a/README_fr.md +++ b/README_fr.md @@ -40,7 +40,8 @@ Castopod is currently in beta but already quite stable and used by podcasters ar - Multi-user: add contributors and set roles - i18n support: translated in English, French & Polish with more to come! -**Version incluse :** 1.0.0-99~ynh2 +**Version incluse :** 1.0.0-99~ynh2 + **Démo :** https://podcast.podlibre.org/@podlibre_fr From e730d673cd5b2336ef81a4596dc360173c1ac141 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 14 Aug 2022 15:32:18 +0200 Subject: [PATCH 02/20] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index a695767..515981a 100755 --- a/manifest.json +++ b/manifest.json @@ -21,7 +21,7 @@ "email": "" }, "requirements": { - "yunohost": ">= 4.3.0" + "yunohost": ">= 11.0.9" }, "multi_instance": true, "services": [ From 66aefff643ed6782e086a342a4c87fbaedb0b714 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Aug 2022 19:06:12 +0200 Subject: [PATCH 03/20] set relative path for --keep opt --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 583be57..5c9ceaa 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -109,7 +109,7 @@ then ynh_secure_remove --file="$final_path/app" ynh_secure_remove --file="$final_path/public/assets" # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" --keep="$final_path/.env" + ynh_setup_source --dest_dir="$final_path" --keep=".env" fi chmod 750 "$final_path" From 4faa627830504929a28e23eb89749a416a2de024 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 1 Oct 2022 19:24:58 +0200 Subject: [PATCH 04/20] Beta 23 --- conf/app.src | 4 ++-- manifest.json | 2 +- scripts/install | 16 ++++++++-------- scripts/restore | 24 +++++++++++++----------- scripts/upgrade | 22 +++++++++++----------- 5 files changed, 35 insertions(+), 33 deletions(-) diff --git a/conf/app.src b/conf/app.src index 9babd5b..2871a7a 100755 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://code.castopod.org/adaures/castopod/uploads/e997234d358aed3f7b0178bd8994e013/castopod-1.0.0-beta.19.zip -SOURCE_SUM=2c19ef3dfb940d4deb610e160a03043b1cd83bc422095f83972533c0e1fe2eb0 +SOURCE_URL=https://code.castopod.org/adaures/castopod/uploads/c6085e0c8a152dc07028852a736eede8/castopod-1.0.0-beta.23.zip +SOURCE_SUM=115ee8908e44a57b977058e36a04b5de5d4b807e76d99745e447d53458aeeb1d SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 515981a..6fcda3b 100755 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Hosting platform made for podcasters", "fr": "Plateforme d'hébergement conçue pour les podcasteurs" }, - "version": "1.0.0-99~ynh2", + "version": "1.0.0-103~ynh1", "url": "https://castopod.org/", "upstream": { "license": "GPL-3.0-only", diff --git a/scripts/install b/scripts/install index 5586713..c4bb857 100755 --- a/scripts/install +++ b/scripts/install @@ -93,14 +93,6 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=1 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -109,6 +101,14 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 # Create a dedicated PHP-FPM config ynh_add_fpm_config --usage=low --footprint=low +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Configuring NGINX web server..." --weight=1 + +# Create a dedicated NGINX config +ynh_add_nginx_config + #================================================= # SPECIFIC SETUP #================================================= diff --git a/scripts/restore b/scripts/restore index ba36ab0..10ac579 100755 --- a/scripts/restore +++ b/scripts/restore @@ -43,16 +43,11 @@ fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=1 -test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path \ + || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -72,6 +67,14 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." --weight=1 + +# Define and install dependencies +ynh_install_app_dependencies $pkg_dependencies + #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= @@ -80,12 +83,11 @@ ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weig ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" #================================================= -# REINSTALL DEPENDENCIES +# RESTORE THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Reinstalling dependencies..." --weight=1 +ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 -# Define and install dependencies -ynh_install_app_dependencies $pkg_dependencies +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RESTORE THE MYSQL DATABASE diff --git a/scripts/upgrade b/scripts/upgrade index 5c9ceaa..40ccb9a 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -83,13 +83,6 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=1 - -ynh_install_app_dependencies $pkg_dependencies - #================================================= # CREATE DEDICATED USER #================================================= @@ -127,12 +120,11 @@ then fi #================================================= -# NGINX CONFIGURATION +# UPGRADE DEPENDENCIES #================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=10 +ynh_script_progression --message="Upgrading dependencies..." --weight=1 -# Create a dedicated NGINX config -ynh_add_nginx_config +ynh_install_app_dependencies $pkg_dependencies #================================================= # PHP-FPM CONFIGURATION @@ -142,6 +134,14 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=10 + +# Create a dedicated NGINX config +ynh_add_nginx_config + #================================================= # CONFIGURE CASTOPOD #================================================= From 5a3786e2e9b1f2e78292c7bd482f7686a37faa90 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 1 Oct 2022 17:25:03 +0000 Subject: [PATCH 05/20] 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 36c01ae..e7f124a 100755 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Castopod is currently in beta but already quite stable and used by podcasters ar - Multi-user: add contributors and set roles - i18n support: translated in English, French & Polish with more to come! -**Shipped version:** 1.0.0-99~ynh2 +**Shipped version:** 1.0.0-103~ynh1 *(:warning: This is the `beta-23` branch. The [`master` branch](https://github.com/YunoHost-Apps/castopod_ynh/tree/master) used in the catalog is currently on version 1.0.0-99\~ynh2.)* **Demo:** https://podcast.podlibre.org/@podlibre_fr diff --git a/README_fr.md b/README_fr.md index 2f3c5e5..3fdaf97 100755 --- a/README_fr.md +++ b/README_fr.md @@ -40,7 +40,7 @@ Castopod is currently in beta but already quite stable and used by podcasters ar - Multi-user: add contributors and set roles - i18n support: translated in English, French & Polish with more to come! -**Version incluse :** 1.0.0-99~ynh2 +**Version incluse :** 1.0.0-103~ynh1 *(:warning: Il s'agit de la branche `beta-23`. La [branche `master`](https://github.com/YunoHost-Apps/castopod_ynh/tree/master) utilisée dans le catalogue est actuellement en 1.0.0-99\~ynh2.)* **Démo :** https://podcast.podlibre.org/@podlibre_fr From c1182a736f07e1220baab09c505276cd4a536091 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 2 Oct 2022 08:32:18 +0000 Subject: [PATCH 06/20] 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 e7f124a..64e3b3b 100755 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Castopod is currently in beta but already quite stable and used by podcasters ar - Multi-user: add contributors and set roles - i18n support: translated in English, French & Polish with more to come! -**Shipped version:** 1.0.0-103~ynh1 *(:warning: This is the `beta-23` branch. The [`master` branch](https://github.com/YunoHost-Apps/castopod_ynh/tree/master) used in the catalog is currently on version 1.0.0-99\~ynh2.)* +**Shipped version:** 1.0.0-103~ynh1 *(:warning: This is the `testing` branch. The [`master` branch](https://github.com/YunoHost-Apps/castopod_ynh/tree/master) used in the catalog is currently on version 1.0.0-99\~ynh2.)* **Demo:** https://podcast.podlibre.org/@podlibre_fr diff --git a/README_fr.md b/README_fr.md index 3fdaf97..cff59e2 100755 --- a/README_fr.md +++ b/README_fr.md @@ -40,7 +40,7 @@ Castopod is currently in beta but already quite stable and used by podcasters ar - Multi-user: add contributors and set roles - i18n support: translated in English, French & Polish with more to come! -**Version incluse :** 1.0.0-103~ynh1 *(:warning: Il s'agit de la branche `beta-23`. La [branche `master`](https://github.com/YunoHost-Apps/castopod_ynh/tree/master) utilisée dans le catalogue est actuellement en 1.0.0-99\~ynh2.)* +**Version incluse :** 1.0.0-103~ynh1 *(:warning: Il s'agit de la branche `testing`. La [branche `master`](https://github.com/YunoHost-Apps/castopod_ynh/tree/master) utilisée dans le catalogue est actuellement en 1.0.0-99\~ynh2.)* **Démo :** https://podcast.podlibre.org/@podlibre_fr From 4a1707c91698f292b802890a499bdfa3b41f7ce6 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Oct 2022 21:49:55 +0200 Subject: [PATCH 07/20] beta 24 --- conf/app.src | 2 +- manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/app.src b/conf/app.src index 2871a7a..85cfac0 100755 --- a/conf/app.src +++ b/conf/app.src @@ -1,4 +1,4 @@ -SOURCE_URL=https://code.castopod.org/adaures/castopod/uploads/c6085e0c8a152dc07028852a736eede8/castopod-1.0.0-beta.23.zip +SOURCE_URL=https://code.castopod.org/adaures/castopod/uploads/8a3999f337de3305213d487c7c306029/castopod-1.0.0-beta.24.zip SOURCE_SUM=115ee8908e44a57b977058e36a04b5de5d4b807e76d99745e447d53458aeeb1d SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip diff --git a/manifest.json b/manifest.json index 6fcda3b..49eb107 100755 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Hosting platform made for podcasters", "fr": "Plateforme d'hébergement conçue pour les podcasteurs" }, - "version": "1.0.0-103~ynh1", + "version": "1.0.0-104~ynh1", "url": "https://castopod.org/", "upstream": { "license": "GPL-3.0-only", From 0d2e9ad06ddf432e4bd4f493fad4c88953445931 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 14 Oct 2022 19:50:00 +0000 Subject: [PATCH 08/20] Auto-update README --- README.md | 3 +-- README_fr.md | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 64e3b3b..e93e1ed 100755 --- a/README.md +++ b/README.md @@ -40,8 +40,7 @@ Castopod is currently in beta but already quite stable and used by podcasters ar - Multi-user: add contributors and set roles - i18n support: translated in English, French & Polish with more to come! -**Shipped version:** 1.0.0-103~ynh1 *(:warning: This is the `testing` branch. The [`master` branch](https://github.com/YunoHost-Apps/castopod_ynh/tree/master) used in the catalog is currently on version 1.0.0-99\~ynh2.)* - +**Shipped version:** 1.0.0-104~ynh1 **Demo:** https://podcast.podlibre.org/@podlibre_fr diff --git a/README_fr.md b/README_fr.md index cff59e2..8365b90 100755 --- a/README_fr.md +++ b/README_fr.md @@ -40,8 +40,7 @@ Castopod is currently in beta but already quite stable and used by podcasters ar - Multi-user: add contributors and set roles - i18n support: translated in English, French & Polish with more to come! -**Version incluse :** 1.0.0-103~ynh1 *(:warning: Il s'agit de la branche `testing`. La [branche `master`](https://github.com/YunoHost-Apps/castopod_ynh/tree/master) utilisée dans le catalogue est actuellement en 1.0.0-99\~ynh2.)* - +**Version incluse :** 1.0.0-104~ynh1 **Démo :** https://podcast.podlibre.org/@podlibre_fr From 8f52cff1f0b8f29264df6802a8f11e0d24c06798 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Oct 2022 21:54:40 +0200 Subject: [PATCH 09/20] Set config panel --- config_panel.toml | 15 ++++++++++----- scripts/install | 11 +++++++++-- scripts/upgrade | 16 ++++++++++++---- 3 files changed, 31 insertions(+), 11 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index 8deb05e..2c01e67 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -7,19 +7,24 @@ name = "Castopod configuration" name = "PHP-FPM configuration" [main.php_fpm_config.fpm_footprint] - ask = "Memory footprint of the service?" - choices = ["low", "medium", "high", "specific"] + ask = "Memory footprint" + type = "select" + choices.low = "Low, <= 20Mb per pool" + choices.medium = "Medium, between 20Mb and 40Mb per pool" + choices.high = "High, > 40Mb per pool" + choices.specific = "Use specific value" default = "low" - help = "low <= 20Mb per pool. medium between 20Mb and 40Mb per pool. high > 40Mb per pool.
Use specific to set a value with the following option." - [main.php_fpm_config.free_footprint] + [main.php_fpm_config.fpm_free_footprint] + visible = "fpm_footprint == 'specific'" ask = "Memory footprint of the service?" type = "number" default = "0" help = "Free field to specify exactly the footprint in Mb if you don't want to use one of the three previous values." [main.php_fpm_config.fpm_usage] - ask = "Expected usage of the service?" + ask = "Expected usage" + type = "select" choices = ["low", "medium", "high"] default = "low" help = "low: Personal usage, behind the SSO. No RAM footprint when not used, but the impact on the processor can be high if many users are using the service.
medium: Low usage, few people or/and publicly accessible. Low RAM footprint, medium processor footprint when used.
high: High usage, frequently visited website. High RAM footprint, but lower on processor usage and quickly responding." diff --git a/scripts/install b/scripts/install index c4bb857..d72895d 100755 --- a/scripts/install +++ b/scripts/install @@ -30,10 +30,13 @@ is_public=$YNH_APP_ARG_IS_PUBLIC admin=$YNH_APP_ARG_ADMIN password="$YNH_APP_ARG_PASSWORD" email=$(ynh_user_get_info --username=$admin --key=mail) -phpversion=$YNH_PHP_VERSION app=$YNH_APP_INSTANCE_NAME +fpm_footprint="low" +fpm_free_footprint=0 +fpm_usage="low" + #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= @@ -54,6 +57,9 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=admin --value=$admin ynh_app_setting_set --app=$app --key=password --value="$password" +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 #================================================= # INSTALL DEPENDENCIES @@ -99,7 +105,8 @@ chown -R $app:www-data "$final_path" ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low +ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # NGINX CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 40ccb9a..7b81dd2 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,6 +25,7 @@ redis_db=$(ynh_app_setting_get --app=$app --key=redis_db) phpversion=$YNH_PHP_VERSION fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) +fpm_free_footprint=$(ynh_app_setting_get --app=$app --key=fpm_free_footprint) fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) #================================================= @@ -66,14 +67,20 @@ fi # 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 + 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 + fpm_usage=low + ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage fi # Cleaning legacy permissions @@ -133,6 +140,7 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # NGINX CONFIGURATION From 883cf76d4142bd0a0826c597edd774df433002a1 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Oct 2022 22:13:36 +0200 Subject: [PATCH 10/20] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index d72895d..8e78523 100755 --- a/scripts/install +++ b/scripts/install @@ -135,7 +135,7 @@ chown $app:www-data "$final_path/.env" #================================================= # SETUP A CRON #================================================= -ynh_script_progression --message="Setuping a cron..." +ynh_script_progression --message="Setuping a cron..." --weight=1 ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" chown root: "/etc/cron.d/$app" From b4705073948f110f1c71b7f44afab45a4268bfc6 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Oct 2022 22:16:13 +0200 Subject: [PATCH 11/20] Update app.src --- conf/app.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/app.src b/conf/app.src index 85cfac0..5e0d32a 100755 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ SOURCE_URL=https://code.castopod.org/adaures/castopod/uploads/8a3999f337de3305213d487c7c306029/castopod-1.0.0-beta.24.zip -SOURCE_SUM=115ee8908e44a57b977058e36a04b5de5d4b807e76d99745e447d53458aeeb1d +SOURCE_SUM=187eaf2e0719892de7b26cd1ddb818e051b60e82d0fe7dc89f189f8e2ea48151 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true From cb1461712ca2830c6b1cab407e97173619ae50a5 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Oct 2022 22:19:58 +0200 Subject: [PATCH 12/20] Update install --- scripts/install | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/install b/scripts/install index 8e78523..3a8b0f4 100755 --- a/scripts/install +++ b/scripts/install @@ -145,22 +145,22 @@ chmod 644 "/etc/cron.d/$app" # SETUP APPLICATION WITH CURL #================================================= -# Set the app as temporarily public for curl call -ynh_script_progression --message="Configuring SSOwat..." --weight=1 -# Making the app public for curl -ynh_permission_update --permission="main" --add="visitors" +# # Set the app as temporarily public for curl call +# ynh_script_progression --message="Configuring SSOwat..." --weight=1 +# # Making the app public for curl +# ynh_permission_update --permission="main" --add="visitors" -# Reload NGINX -ynh_systemd_action --service_name=nginx --action=reload +# # Reload NGINX +# ynh_systemd_action --service_name=nginx --action=reload -# Installation with curl -ynh_script_progression --message="Finalizing installation..." --weight=1 +# # Installation with curl +# ynh_script_progression --message="Finalizing installation..." --weight=1 -ynh_local_curl "/cp-install" +# ynh_local_curl "/cp-install" -ynh_local_curl "/cp-install/create-superadmin" "email=$email" "username=$admin" "password=$password" +# ynh_local_curl "/cp-install/create-superadmin" "email=$email" "username=$admin" "password=$password" -ynh_permission_update --permission="main" --remove="visitors" +# ynh_permission_update --permission="main" --remove="visitors" #================================================= # SETUP SSOWAT From 52795460e921d48aff5bf9699594da49f9ffa732 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Oct 2022 22:26:44 +0200 Subject: [PATCH 13/20] Update .env.example --- conf/.env.example | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/conf/.env.example b/conf/.env.example index 3068d48..1dde2ef 100644 --- a/conf/.env.example +++ b/conf/.env.example @@ -27,6 +27,21 @@ database.default.username="__DB_USER__" database.default.password="__DB_PWD__" database.default.DBPrefix="cp_" +#-------------------------------------------------------------------- +# Email configuration +#-------------------------------------------------------------------- +# email.fromEmail="__EMAIL__" +# email.SMTPHost="loclhost" +# email.SMTPUser="" +# email.SMTPPass="" + +#-------------------------------------------------------------------- +# Cache configuration (advanced) +# +# Keep as is if you don't know what this means +#-------------------------------------------------------------------- +cache.handler="file" + #-------------------------------------------------------------------- # Redis configuration #-------------------------------------------------------------------- From fd847aad600c778db07af4fdadf962b3241eeece Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Oct 2022 22:34:43 +0200 Subject: [PATCH 14/20] Update install --- scripts/install | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/install b/scripts/install index 3a8b0f4..f66e3d9 100755 --- a/scripts/install +++ b/scripts/install @@ -145,22 +145,22 @@ chmod 644 "/etc/cron.d/$app" # SETUP APPLICATION WITH CURL #================================================= -# # Set the app as temporarily public for curl call -# ynh_script_progression --message="Configuring SSOwat..." --weight=1 -# # Making the app public for curl -# ynh_permission_update --permission="main" --add="visitors" +# Set the app as temporarily public for curl call +ynh_script_progression --message="Configuring SSOwat..." --weight=1 +# Making the app public for curl +ynh_permission_update --permission="main" --add="visitors" -# # Reload NGINX -# ynh_systemd_action --service_name=nginx --action=reload +# Reload NGINX +ynh_systemd_action --service_name=nginx --action=reload -# # Installation with curl -# ynh_script_progression --message="Finalizing installation..." --weight=1 +# Installation with curl +ynh_script_progression --message="Finalizing installation..." --weight=1 -# ynh_local_curl "/cp-install" +#ynh_local_curl "/cp-install" -# ynh_local_curl "/cp-install/create-superadmin" "email=$email" "username=$admin" "password=$password" +ynh_local_curl "/cp-install/create-superadmin" "email=$email" "username=$admin" "password=$password" -# ynh_permission_update --permission="main" --remove="visitors" +ynh_permission_update --permission="main" --remove="visitors" #================================================= # SETUP SSOWAT From 99891983a8f22f49a53f5bdac32728c1d066011c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Oct 2022 22:36:23 +0200 Subject: [PATCH 15/20] Update install --- scripts/install | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/install b/scripts/install index f66e3d9..3a8b0f4 100755 --- a/scripts/install +++ b/scripts/install @@ -145,22 +145,22 @@ chmod 644 "/etc/cron.d/$app" # SETUP APPLICATION WITH CURL #================================================= -# Set the app as temporarily public for curl call -ynh_script_progression --message="Configuring SSOwat..." --weight=1 -# Making the app public for curl -ynh_permission_update --permission="main" --add="visitors" +# # Set the app as temporarily public for curl call +# ynh_script_progression --message="Configuring SSOwat..." --weight=1 +# # Making the app public for curl +# ynh_permission_update --permission="main" --add="visitors" -# Reload NGINX -ynh_systemd_action --service_name=nginx --action=reload +# # Reload NGINX +# ynh_systemd_action --service_name=nginx --action=reload -# Installation with curl -ynh_script_progression --message="Finalizing installation..." --weight=1 +# # Installation with curl +# ynh_script_progression --message="Finalizing installation..." --weight=1 -#ynh_local_curl "/cp-install" +# ynh_local_curl "/cp-install" -ynh_local_curl "/cp-install/create-superadmin" "email=$email" "username=$admin" "password=$password" +# ynh_local_curl "/cp-install/create-superadmin" "email=$email" "username=$admin" "password=$password" -ynh_permission_update --permission="main" --remove="visitors" +# ynh_permission_update --permission="main" --remove="visitors" #================================================= # SETUP SSOWAT From 011f9ebad682a699a6bd1ccfd2b709f314306786 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Oct 2022 22:51:46 +0200 Subject: [PATCH 16/20] Remove curl --- conf/.env.example | 8 -------- manifest.json | 8 -------- scripts/backup | 2 +- scripts/install | 26 -------------------------- scripts/restore | 2 +- scripts/upgrade | 2 +- 6 files changed, 3 insertions(+), 45 deletions(-) diff --git a/conf/.env.example b/conf/.env.example index 1dde2ef..6f63bf9 100644 --- a/conf/.env.example +++ b/conf/.env.example @@ -27,14 +27,6 @@ database.default.username="__DB_USER__" database.default.password="__DB_PWD__" database.default.DBPrefix="cp_" -#-------------------------------------------------------------------- -# Email configuration -#-------------------------------------------------------------------- -# email.fromEmail="__EMAIL__" -# email.SMTPHost="loclhost" -# email.SMTPUser="" -# email.SMTPPass="" - #-------------------------------------------------------------------- # Cache configuration (advanced) # diff --git a/manifest.json b/manifest.json index 49eb107..6b719d1 100755 --- a/manifest.json +++ b/manifest.json @@ -39,10 +39,6 @@ "fr": "Castopod doit être installé dans un domaine ou sous-domaine dédié." } }, - { - "name": "admin", - "type": "user" - }, { "name": "is_public", "type": "boolean", @@ -51,10 +47,6 @@ "fr": "Si cette case est cochée, Castopod sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." }, "default": true - }, - { - "name": "password", - "type": "password" } ] } diff --git a/scripts/backup b/scripts/backup index e05640a..35163de 100755 --- a/scripts/backup +++ b/scripts/backup @@ -26,7 +26,7 @@ app=$YNH_APP_INSTANCE_NAME final_path=$(ynh_app_setting_get --app=$app --key=final_path) domain=$(ynh_app_setting_get --app=$app --key=domain) db_name=$(ynh_app_setting_get --app=$app --key=db_name) -phpversion=$YNH_PHP_VERSION +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP diff --git a/scripts/install b/scripts/install index 3a8b0f4..4d0679a 100755 --- a/scripts/install +++ b/scripts/install @@ -27,9 +27,6 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url="/" is_public=$YNH_APP_ARG_IS_PUBLIC -admin=$YNH_APP_ARG_ADMIN -password="$YNH_APP_ARG_PASSWORD" -email=$(ynh_user_get_info --username=$admin --key=mail) app=$YNH_APP_INSTANCE_NAME @@ -55,8 +52,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url -ynh_app_setting_set --app=$app --key=admin --value=$admin -ynh_app_setting_set --app=$app --key=password --value="$password" 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 @@ -141,27 +136,6 @@ ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" chown root: "/etc/cron.d/$app" chmod 644 "/etc/cron.d/$app" -#================================================= -# SETUP APPLICATION WITH CURL -#================================================= - -# # Set the app as temporarily public for curl call -# ynh_script_progression --message="Configuring SSOwat..." --weight=1 -# # Making the app public for curl -# ynh_permission_update --permission="main" --add="visitors" - -# # Reload NGINX -# ynh_systemd_action --service_name=nginx --action=reload - -# # Installation with curl -# ynh_script_progression --message="Finalizing installation..." --weight=1 - -# ynh_local_curl "/cp-install" - -# ynh_local_curl "/cp-install/create-superadmin" "email=$email" "username=$admin" "password=$password" - -# ynh_permission_update --permission="main" --remove="visitors" - #================================================= # SETUP SSOWAT #================================================= diff --git a/scripts/restore b/scripts/restore index 10ac579..7a1bbd6 100755 --- a/scripts/restore +++ b/scripts/restore @@ -33,7 +33,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name -phpversion=$YNH_PHP_VERSION +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) diff --git a/scripts/upgrade b/scripts/upgrade index 7b81dd2..d5355e8 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -22,7 +22,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) redis_db=$(ynh_app_setting_get --app=$app --key=redis_db) -phpversion=$YNH_PHP_VERSION +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) fpm_free_footprint=$(ynh_app_setting_get --app=$app --key=fpm_free_footprint) From 0bc0236bc08ca5ebf8a4a28d1f6c5aa95cdd77ca Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 15 Oct 2022 08:50:50 +0200 Subject: [PATCH 17/20] Add extr fpm conf --- conf/extra_php-fpm.conf | 4 + conf/php-fpm.conf | 433 ---------------------------------------- scripts/conf | 14 +- 3 files changed, 11 insertions(+), 440 deletions(-) create mode 100644 conf/extra_php-fpm.conf delete mode 100755 conf/php-fpm.conf diff --git a/conf/extra_php-fpm.conf b/conf/extra_php-fpm.conf new file mode 100644 index 0000000..641f3da --- /dev/null +++ b/conf/extra_php-fpm.conf @@ -0,0 +1,4 @@ +; Additional php.ini defines, specific to this pool of workers. + +php_admin_value[upload_max_filesize] = 512M +php_admin_value[post_max_size] = 512M \ No newline at end of file diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf deleted file mode 100755 index 1130586..0000000 --- a/conf/php-fpm.conf +++ /dev/null @@ -1,433 +0,0 @@ -; Start a new pool named 'www'. -; the variable $pool can be used in any directive and will be replaced by the -; pool name ('www' here) -[__NAMETOCHANGE__] - -; Per pool prefix -; It only applies on the following directives: -; - 'access.log' -; - 'slowlog' -; - 'listen' (unixsocket) -; - 'chroot' -; - 'chdir' -; - 'php_values' -; - 'php_admin_values' -; When not set, the global prefix (or /usr) applies instead. -; Note: This directive can also be relative to the global prefix. -; Default Value: none -;prefix = /path/to/pools/$pool - -; Unix user/group of processes -; Note: The user is mandatory. If the group is not set, the default user's group -; will be used. -user = __USER__ -group = __USER__ - -; The address on which to accept FastCGI requests. -; Valid syntaxes are: -; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on -; a specific port; -; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on -; a specific port; -; 'port' - to listen on a TCP socket to all addresses -; (IPv6 and IPv4-mapped) on a specific port; -; '/path/to/unix/socket' - to listen on a unix socket. -; Note: This value is mandatory. -listen = /var/run/php/php__PHPVERSION__-fpm-__NAMETOCHANGE__.sock - -; Set listen(2) backlog. -; Default Value: 511 (-1 on FreeBSD and OpenBSD) -;listen.backlog = 511 - -; Set permissions for unix socket, if one is used. In Linux, read/write -; permissions must be set in order to allow connections from a web server. Many -; BSD-derived systems allow connections regardless of permissions. -; Default Values: user and group are set as the running user -; mode is set to 0660 -listen.owner = www-data -listen.group = www-data -;listen.mode = 0660 -; When POSIX Access Control Lists are supported you can set them using -; these options, value is a comma separated list of user/group names. -; When set, listen.owner and listen.group are ignored -;listen.acl_users = -;listen.acl_groups = - -; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect. -; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original -; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address -; must be separated by a comma. If this value is left blank, connections will be -; accepted from any ip address. -; Default Value: any -;listen.allowed_clients = 127.0.0.1 - -; Specify the nice(2) priority to apply to the pool processes (only if set) -; The value can vary from -19 (highest priority) to 20 (lower priority) -; Note: - It will only work if the FPM master process is launched as root -; - The pool processes will inherit the master process priority -; unless it specified otherwise -; Default Value: no set -; process.priority = -19 - -; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user -; or group is differrent than the master process user. It allows to create process -; core dump and ptrace the process for the pool user. -; Default Value: no -; process.dumpable = yes - -; Choose how the process manager will control the number of child processes. -; Possible Values: -; static - a fixed number (pm.max_children) of child processes; -; dynamic - the number of child processes are set dynamically based on the -; following directives. With this process management, there will be -; always at least 1 children. -; pm.max_children - the maximum number of children that can -; be alive at the same time. -; pm.start_servers - the number of children created on startup. -; pm.min_spare_servers - the minimum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is less than this -; number then some children will be created. -; pm.max_spare_servers - the maximum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is greater than this -; number then some children will be killed. -; ondemand - no children are created at startup. Children will be forked when -; new requests will connect. The following parameter are used: -; pm.max_children - the maximum number of children that -; can be alive at the same time. -; pm.process_idle_timeout - The number of seconds after which -; an idle process will be killed. -; Note: This value is mandatory. -pm = dynamic - -; The number of child processes to be created when pm is set to 'static' and the -; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. -; This value sets the limit on the number of simultaneous requests that will be -; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. -; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP -; CGI. The below defaults are based on a server without much resources. Don't -; forget to tweak pm.* to fit your needs. -; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' -; Note: This value is mandatory. -pm.max_children = 5 - -; The number of child processes created on startup. -; Note: Used only when pm is set to 'dynamic' -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 -pm.start_servers = 2 - -; The desired minimum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.min_spare_servers = 1 - -; The desired maximum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.max_spare_servers = 3 - -; The number of seconds after which an idle process will be killed. -; Note: Used only when pm is set to 'ondemand' -; Default Value: 10s -;pm.process_idle_timeout = 10s; - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. For -; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default Value: 0 -;pm.max_requests = 500 - -; The URI to view the FPM status page. If this value is not set, no URI will be -; recognized as a status page. It shows the following informations: -; pool - the name of the pool; -; process manager - static, dynamic or ondemand; -; start time - the date and time FPM has started; -; start since - number of seconds since FPM has started; -; accepted conn - the number of request accepted by the pool; -; listen queue - the number of request in the queue of pending -; connections (see backlog in listen(2)); -; max listen queue - the maximum number of requests in the queue -; of pending connections since FPM has started; -; listen queue len - the size of the socket queue of pending connections; -; idle processes - the number of idle processes; -; active processes - the number of active processes; -; total processes - the number of idle + active processes; -; max active processes - the maximum number of active processes since FPM -; has started; -; max children reached - number of times, the process limit has been reached, -; when pm tries to start more children (works only for -; pm 'dynamic' and 'ondemand'); -; Value are updated in real time. -; Example output: -; pool: www -; process manager: static -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 62636 -; accepted conn: 190460 -; listen queue: 0 -; max listen queue: 1 -; listen queue len: 42 -; idle processes: 4 -; active processes: 11 -; total processes: 15 -; max active processes: 12 -; max children reached: 0 -; -; By default the status page output is formatted as text/plain. Passing either -; 'html', 'xml' or 'json' in the query string will return the corresponding -; output syntax. Example: -; http://www.foo.bar/status -; http://www.foo.bar/status?json -; http://www.foo.bar/status?html -; http://www.foo.bar/status?xml -; -; By default the status page only outputs short status. Passing 'full' in the -; query string will also return status for each pool process. -; Example: -; http://www.foo.bar/status?full -; http://www.foo.bar/status?json&full -; http://www.foo.bar/status?html&full -; http://www.foo.bar/status?xml&full -; The Full status returns for each process: -; pid - the PID of the process; -; state - the state of the process (Idle, Running, ...); -; start time - the date and time the process has started; -; start since - the number of seconds since the process has started; -; requests - the number of requests the process has served; -; request duration - the duration in µs of the requests; -; request method - the request method (GET, POST, ...); -; request URI - the request URI with the query string; -; content length - the content length of the request (only with POST); -; user - the user (PHP_AUTH_USER) (or '-' if not set); -; script - the main script called (or '-' if not set); -; last request cpu - the %cpu the last request consumed -; it's always 0 if the process is not in Idle state -; because CPU calculation is done when the request -; processing has terminated; -; last request memory - the max amount of memory the last request consumed -; it's always 0 if the process is not in Idle state -; because memory calculation is done when the request -; processing has terminated; -; If the process is in Idle state, then informations are related to the -; last request the process has served. Otherwise informations are related to -; the current request being served. -; Example output: -; ************************ -; pid: 31330 -; state: Running -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 63087 -; requests: 12808 -; request duration: 1250261 -; request method: GET -; request URI: /test_mem.php?N=10000 -; content length: 0 -; user: - -; script: /home/fat/web/docs/php/test_mem.php -; last request cpu: 0.00 -; last request memory: 0 -; -; Note: There is a real-time FPM status monitoring sample web page available -; It's available in: /usr/share/php/7.0/fpm/status.html -; -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -;pm.status_path = /status - -; The ping URI to call the monitoring page of FPM. If this value is not set, no -; URI will be recognized as a ping page. This could be used to test from outside -; that FPM is alive and responding, or to -; - create a graph of FPM availability (rrd or such); -; - remove a server from a group if it is not responding (load balancing); -; - trigger alerts for the operating team (24/7). -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -;ping.path = /ping - -; This directive may be used to customize the response of a ping request. The -; response is formatted as text/plain with a 200 response code. -; Default Value: pong -;ping.response = pong - -; The access log file -; Default: not set -;access.log = log/$pool.access.log - -; The access log format. -; The following syntax is allowed -; %%: the '%' character -; %C: %CPU used by the request -; it can accept the following format: -; - %{user}C for user CPU only -; - %{system}C for system CPU only -; - %{total}C for user + system CPU (default) -; %d: time taken to serve the request -; it can accept the following format: -; - %{seconds}d (default) -; - %{miliseconds}d -; - %{mili}d -; - %{microseconds}d -; - %{micro}d -; %e: an environment variable (same as $_ENV or $_SERVER) -; it must be associated with embraces to specify the name of the env -; variable. Some exemples: -; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e -; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e -; %f: script filename -; %l: content-length of the request (for POST request only) -; %m: request method -; %M: peak of memory allocated by PHP -; it can accept the following format: -; - %{bytes}M (default) -; - %{kilobytes}M -; - %{kilo}M -; - %{megabytes}M -; - %{mega}M -; %n: pool name -; %o: output header -; it must be associated with embraces to specify the name of the header: -; - %{Content-Type}o -; - %{X-Powered-By}o -; - %{Transfert-Encoding}o -; - .... -; %p: PID of the child that serviced the request -; %P: PID of the parent of the child that serviced the request -; %q: the query string -; %Q: the '?' character if query string exists -; %r: the request URI (without the query string, see %q and %Q) -; %R: remote IP address -; %s: status (response code) -; %t: server time the request was received -; it can accept a strftime(3) format: -; %d/%b/%Y:%H:%M:%S %z (default) -; The strftime(3) format must be encapsuled in a %{}t tag -; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t -; %T: time the log has been written (the request has finished) -; it can accept a strftime(3) format: -; %d/%b/%Y:%H:%M:%S %z (default) -; The strftime(3) format must be encapsuled in a %{}t tag -; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t -; %u: remote user -; -; Default: "%R - %u %t \"%m %r\" %s" -;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" - -; The log file for slow requests -; Default Value: not set -; Note: slowlog is mandatory if request_slowlog_timeout is set -;slowlog = log/$pool.log.slow - -; The timeout for serving a single request after which a PHP backtrace will be -; dumped to the 'slowlog' file. A value of '0s' means 'off'. -; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) -; Default Value: 0 -;request_slowlog_timeout = 0 - -; The timeout for serving a single request after which the worker process will -; be killed. This option should be used when the 'max_execution_time' ini option -; does not stop script execution for some reason. A value of '0' means 'off'. -; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) -; Default Value: 0 -request_terminate_timeout = 1d - -; Set open file descriptor rlimit. -; Default Value: system defined value -;rlimit_files = 1024 - -; Set max core size rlimit. -; Possible Values: 'unlimited' or an integer greater or equal to 0 -; Default Value: system defined value -;rlimit_core = 0 - -; Chroot to this directory at the start. This value must be defined as an -; absolute path. When this value is not set, chroot is not used. -; Note: you can prefix with '$prefix' to chroot to the pool prefix or one -; of its subdirectories. If the pool prefix is not set, the global prefix -; will be used instead. -; Note: chrooting is a great security feature and should be used whenever -; possible. However, all PHP paths will be relative to the chroot -; (error_log, sessions.save_path, ...). -; Default Value: not set -;chroot = - -; Chdir to this directory at the start. -; Note: relative path can be used. -; Default Value: current directory or / when chroot -chdir = __FINALPATH__ - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -;catch_workers_output = yes - -; Clear environment in FPM workers -; Prevents arbitrary environment variables from reaching FPM worker processes -; by clearing the environment in workers before env vars specified in this -; pool configuration are added. -; Setting to "no" will make all environment variables available to PHP code -; via getenv(), $_ENV and $_SERVER. -; Default Value: yes -;clear_env = no - -; Limits the extensions of the main script FPM will allow to parse. This can -; prevent configuration mistakes on the web server side. You should only limit -; FPM to .php extensions to prevent malicious users to use other extensions to -; execute php code. -; Note: set an empty value to allow all extensions. -; Default Value: .php -;security.limit_extensions = .php .php3 .php4 .php5 .php7 - -; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from -; the current environment. -; Default Value: clean env -;env[HOSTNAME] = $HOSTNAME -;env[PATH] = /usr/local/bin:/usr/bin:/bin -;env[TMP] = /tmp -;env[TMPDIR] = /tmp -;env[TEMP] = /tmp - -; Additional php.ini defines, specific to this pool of workers. These settings -; overwrite the values previously defined in the php.ini. The directives are the -; same as the PHP SAPI: -; php_value/php_flag - you can set classic ini defines which can -; be overwritten from PHP call 'ini_set'. -; php_admin_value/php_admin_flag - these directives won't be overwritten by -; PHP call 'ini_set' -; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. -php_admin_value[upload_max_filesize] = 512M -php_admin_value[memory_limit] = 512M -php_admin_value[post_max_size] = 512M - -; Defining 'extension' will load the corresponding shared extension from -; extension_dir. Defining 'disable_functions' or 'disable_classes' will not -; overwrite previously defined php.ini values, but will append the new value -; instead. - -; Note: path INI options can be relative and will be expanded with the prefix -; (pool, global or /usr) - -; Default Value: nothing is defined by default except the values in php.ini and -; specified at startup with the -d argument -;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com -;php_flag[display_errors] = off -;php_admin_value[error_log] = /var/log/fpm-php.www.log -;php_admin_flag[log_errors] = on -;php_admin_value[memory_limit] = 32M - -; Common values to change to increase file upload limit -php_admin_value[upload_max_filesize] = 500M -php_admin_value[post_max_size] = 512M -; php_admin_flag[mail.add_x_header] = Off - -; Other common parameters -; php_admin_value[max_execution_time] = 600 -; php_admin_value[max_input_time] = 300 -php_admin_value[memory_limit] = 256M -; php_admin_flag[short_open_tag] = On diff --git a/scripts/conf b/scripts/conf index 8a9110c..91c2de7 100644 --- a/scripts/conf +++ b/scripts/conf @@ -56,10 +56,10 @@ set__fpm_footprint() { fi } -set__free_footprint() { - if [ "$fpm_footprint" == "specific" ] +set__fpm_free_footprint() { + if [ "$fpm_footprint" = "specific" ] then - ynh_app_setting_set --app=$app --key=fpm_footprint --value="$free_footprint" + ynh_app_setting_set --app=$app --key=fpm_footprint --value="$fpm_free_footprint" fi } @@ -70,11 +70,11 @@ set__free_footprint() { ynh_app_config_validate() { _ynh_app_config_validate - if [ "${changed[fpm_usage]}" == "true" ] || [ "${changed[fpm_footprint]}" == "true" ] || [ "${changed[free_footprint]}" == "true" ]; then - # If fpm_footprint is set to 'specific', use $free_footprint value. - if [ "$fpm_footprint" == "specific" ] + if [ "${changed[fpm_usage]}" == "true" ] || [ "${changed[fpm_footprint]}" == "true" ] || [ "${changed[fpm_free_footprint]}" == "true" ]; then + # If fpm_footprint is set to 'specific', use $fpm_free_footprint value. + if [ "$fpm_footprint" = "specific" ] then - fpm_footprint=$free_footprint + fpm_footprint=$fpm_free_footprint fi if [ "$fpm_footprint" == "0" ] From b76911a7ac2cbe5f9a7bcda5b693731f2675365a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 20 Oct 2022 12:33:59 +0200 Subject: [PATCH 18/20] Upgrade to upstream --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index 5e0d32a..7a145bb 100755 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://code.castopod.org/adaures/castopod/uploads/8a3999f337de3305213d487c7c306029/castopod-1.0.0-beta.24.zip -SOURCE_SUM=187eaf2e0719892de7b26cd1ddb818e051b60e82d0fe7dc89f189f8e2ea48151 +SOURCE_URL=https://code.castopod.org/adaures/castopod/uploads/0e62acc6b37ad554b6359ae1bed0a175/castopod-1.0.0.zip +SOURCE_SUM=cedc8c9316cd4d88602992494ef20b26469f85ccd2c1083384f9e143f833e105 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 6b719d1..e2bf448 100755 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Hosting platform made for podcasters", "fr": "Plateforme d'hébergement conçue pour les podcasteurs" }, - "version": "1.0.0-104~ynh1", + "version": "1.0.0~ynh1", "url": "https://castopod.org/", "upstream": { "license": "GPL-3.0-only", From 967c9df8c39d97357edf73dc1c98b2060b7dd24c Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 20 Oct 2022 10:34:05 +0000 Subject: [PATCH 19/20] 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 e93e1ed..795d108 100755 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Castopod is currently in beta but already quite stable and used by podcasters ar - Multi-user: add contributors and set roles - i18n support: translated in English, French & Polish with more to come! -**Shipped version:** 1.0.0-104~ynh1 +**Shipped version:** 1.0.0~ynh1 **Demo:** https://podcast.podlibre.org/@podlibre_fr diff --git a/README_fr.md b/README_fr.md index 8365b90..d296331 100755 --- a/README_fr.md +++ b/README_fr.md @@ -40,7 +40,7 @@ Castopod is currently in beta but already quite stable and used by podcasters ar - Multi-user: add contributors and set roles - i18n support: translated in English, French & Polish with more to come! -**Version incluse :** 1.0.0-104~ynh1 +**Version incluse :** 1.0.0~ynh1 **Démo :** https://podcast.podlibre.org/@podlibre_fr From e07e93120201235574037b87408b81cdd1a7ed75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 21 Oct 2022 08:12:36 +0200 Subject: [PATCH 20/20] upgrade to PHP8.1 #80 --- manifest.json | 2 +- scripts/_common.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index e2bf448..769cdd4 100755 --- a/manifest.json +++ b/manifest.json @@ -26,7 +26,7 @@ "multi_instance": true, "services": [ "nginx", - "php8.0-fpm", + "php8.1-fpm", "mysql" ], "arguments": { diff --git a/scripts/_common.sh b/scripts/_common.sh index dde308f..f41e323 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="8.0" +YNH_PHP_VERSION="8.1" pkg_dependencies="ffmpeg php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mysqlnd"