From 3733e53c3155ac49b68f3faf792c6a639213c8ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 12 Nov 2023 09:10:55 +0100 Subject: [PATCH 1/3] cleaning --- conf/nginx.conf | 2 +- manifest.toml | 11 +++++++---- scripts/restore | 7 +------ scripts/upgrade | 7 +------ 4 files changed, 10 insertions(+), 17 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 319eef1..2dad80d 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -7,7 +7,7 @@ location __PATH__/ { index index.php; # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file - #client_max_body_size 50M; + client_max_body_size 50M; try_files $uri $uri/ index.php; location ~ [^/]\.php(/|$) { diff --git a/manifest.toml b/manifest.toml index 39f7c09..f26d23d 100644 --- a/manifest.toml +++ b/manifest.toml @@ -14,11 +14,14 @@ license = "GPL-3.0-or-later" website = "https://www.php.net/manual/fr/function.phpinfo.php" [integration] -yunohost = ">= 11.1.21" +yunohost = ">= 11.2" architectures = "all" multi_instance = true + ldap = false + sso = false + disk = "50M" ram.build = "50M" ram.runtime = "50M" @@ -34,9 +37,9 @@ ram.runtime = "50M" [install.phpversion] ask.en = "Choose the version of PHP to use." ask.fr = "Choisissez la version de PHP à utiliser." - type = "string" + type = "select" choices = ["7.4", "8.0", "8.1", "8.2"] - default = "8.0" + default = "8.2" [resources] [resources.system_user] @@ -47,4 +50,4 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "php8.0-fpm" \ No newline at end of file + packages = "php8.2-fpm" \ No newline at end of file diff --git a/scripts/restore b/scripts/restore index 08cbd68..3f991ef 100755 --- a/scripts/restore +++ b/scripts/restore @@ -26,12 +26,7 @@ chown -R $app:www-data "$install_dir" ynh_script_progression --message="Restoring the PHP-FPM configuration..." # Recreate a dedicated php-fpm config -ynh_add_fpm_config --usage=low --footprint=low - -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." +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" diff --git a/scripts/upgrade b/scripts/upgrade index fbdedec..dac6b85 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -36,12 +36,7 @@ chown -R $app:www-data "$install_dir" ynh_script_progression --message="Upgrading PHP-FPM configuration..." # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low - -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." +ynh_add_fpm_config # Create a dedicated NGINX config ynh_add_nginx_config From 2b2bc3290a3742b5ccc769e0aaf2a89133dcf4cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 12 Nov 2023 09:11:17 +0100 Subject: [PATCH 2/3] Update manifest.toml --- manifest.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index f26d23d..3824c38 100644 --- a/manifest.toml +++ b/manifest.toml @@ -34,6 +34,10 @@ ram.runtime = "50M" type = "path" default = "/phpinfo" + [install.init_main_permission] + type = "group" + default = "visitors" + [install.phpversion] ask.en = "Choose the version of PHP to use." ask.fr = "Choisissez la version de PHP à utiliser." @@ -50,4 +54,5 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "php8.2-fpm" \ No newline at end of file + packages = "php8.2-fpm" + \ No newline at end of file From fa63673c3bb09f9c7ece47656dc4eab7b985b08e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 12 Nov 2023 09:11:43 +0100 Subject: [PATCH 3/3] cleaning --- scripts/install | 7 +------ scripts/remove | 5 ----- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/scripts/install b/scripts/install index 1c78ff1..447784c 100755 --- a/scripts/install +++ b/scripts/install @@ -28,12 +28,7 @@ chown -R $app:www-data "$install_dir" ynh_script_progression --message="Configuring PHP-FPM..." # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low - -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." +ynh_add_fpm_config # Create a dedicated NGINX config ynh_add_nginx_config diff --git a/scripts/remove b/scripts/remove index c9f5356..2c04d62 100755 --- a/scripts/remove +++ b/scripts/remove @@ -17,11 +17,6 @@ ynh_script_progression --message="Removing NGINX web server configuration..." # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# REMOVE PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Removing PHP-FPM configuration..." - # Remove the dedicated PHP-FPM config ynh_remove_fpm_config