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] 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 #=================================================