diff --git a/conf/nginx.conf b/conf/nginx.conf index c169ca5..c9fb7eb 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,11 +4,10 @@ location __PATH__/ { # Path to source alias __FINALPATH__/; -### Example PHP configuration (remove it if not used) index index.php __PATH__/_h5ai/public/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 500M; try_files $uri.html $uri $uri/ =404; @@ -24,7 +23,6 @@ location __PATH__/ { fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $request_filename; } -### End of PHP configuration part # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf index ab1a471..573704e 100644 --- a/conf/php-fpm.conf +++ b/conf/php-fpm.conf @@ -419,8 +419,8 @@ chdir = __FINALPATH__ ;php_admin_value[memory_limit] = 32M ; Common values to change to increase file upload limit -; php_admin_value[upload_max_filesize] = 50M -; php_admin_value[post_max_size] = 50M +php_admin_value[upload_max_filesize] = 500M +php_admin_value[post_max_size] = 500M ; php_admin_flag[mail.add_x_header] = Off ; Other common parameters diff --git a/manifest.json b/manifest.json index 61f1449..fbe90f7 100644 --- a/manifest.json +++ b/manifest.json @@ -21,7 +21,7 @@ "email": "alex.aubin@mailoo.org" }, "requirements": { - "yunohost": ">= 4.3.0" + "yunohost": ">= 11.0.9" }, "multi_instance": true, "services": [ diff --git a/scripts/_common.sh b/scripts/_common.sh index 6fb7135..caa3c0c 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,7 +7,9 @@ YNH_PHP_VERSION=7.4 # dependencies used by the app -pkg_dependencies="php$YNH_PHP_VERSION-fpm ffmpeg imagemagick" +php_dependencies="php$YNH_PHP_VERSION-fpm" + +pkg_dependencies="ffmpeg imagemagick $php_dependencies" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 5c2c8b7..fd9d729 100644 --- a/scripts/install +++ b/scripts/install @@ -82,14 +82,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 #================================================= @@ -97,6 +89,15 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 # Create a dedicated PHP-FPM config ynh_add_fpm_config +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) + +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Configuring NGINX web server..." --weight=1 + +# Create a dedicated NGINX config +ynh_add_nginx_config #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index 813cb0f..cfb077f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -42,13 +42,6 @@ test ! -d $final_path \ #================================================= # STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -68,6 +61,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 #================================================= @@ -76,14 +77,11 @@ ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weig ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" #================================================= -# SPECIFIC RESTORATION +# RESTORE THE NGINX CONFIGURATION #================================================= -# REINSTALL DEPENDENCIES -#================================================= -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" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index af7a987..b05af36 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -71,14 +71,6 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # UPGRADE DEPENDENCIES #================================================= @@ -94,6 +86,14 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 # Create a dedicated PHP-FPM config ynh_add_fpm_config +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 + +# Create a dedicated NGINX config +ynh_add_nginx_config + #================================================= # RELOAD NGINX #=================================================