From e7ab8db4799d46fd3b6b3e769e73e8b379a96a3b Mon Sep 17 00:00:00 2001 From: Jason Kendall Date: Mon, 24 Feb 2020 13:36:42 -0500 Subject: [PATCH] .gitignore broken, didn't actually add this file --- server/files/entrypoint_fpm.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 server/files/entrypoint_fpm.sh diff --git a/server/files/entrypoint_fpm.sh b/server/files/entrypoint_fpm.sh new file mode 100755 index 0000000..825624b --- /dev/null +++ b/server/files/entrypoint_fpm.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +change_php_vars(){ + for FILE in /etc/php/*/fpm/php.ini + do + [[ -e $FILE ]] || break + sed -i "s/memory_limit = .*/memory_limit = 2048M/" "$FILE" + sed -i "s/max_execution_time = .*/max_execution_time = 300/" "$FILE" + sed -i "s/upload_max_filesize = .*/upload_max_filesize = 50M/" "$FILE" + sed -i "s/post_max_size = .*/post_max_size = 50M/" "$FILE" + done +} + +echo "Configure PHP | Change PHP values ..." && change_php_vars +echo "Starting PHP FPM" + +/usr/sbin/php-fpm7.3 -R -F \ No newline at end of file