diff --git a/php-fpm-nginx/7.3/Dockerfile b/php-fpm-nginx/7.3/Dockerfile index 86975f6..99f8d00 100644 --- a/php-fpm-nginx/7.3/Dockerfile +++ b/php-fpm-nginx/7.3/Dockerfile @@ -4,7 +4,7 @@ FROM ushahidi/debian:buster-dockerize # same minor version ENV PHP_VERSION=7 \ PHP_MAJOR_VERSION=7.3 \ - PHP_MINOR_VERSION=7.3.27 \ + PHP_MINOR_VERSION=7.3.33 \ PHP_DOCKER_USH_BUILD_SEQ=1 # Install php, extensions and handy tools @@ -42,6 +42,7 @@ RUN apt-get update && \ RUN ln -sf /dev/stdout /var/log/nginx/access.log && \ ln -sf /dev/stderr /var/log/nginx/error.log ADD php-fpm.conf ${DOCKERIZE_TEMPLATE_DIR}/etc/php/${PHP_MAJOR_VERSION}/fpm/php-fpm.conf +ADD php-ush.ini ${DOCKERIZE_TEMPLATE_DIR}/etc/php/${PHP_MAJOR_VERSION}/fpm/conf.d/99-ush.ini # Install composer 1.x and 2.x RUN curl -sS https://getcomposer.org/installer | \ diff --git a/php-fpm-nginx/7.4/Dockerfile b/php-fpm-nginx/7.4/Dockerfile index 36b4ef2..9afcac2 100644 --- a/php-fpm-nginx/7.4/Dockerfile +++ b/php-fpm-nginx/7.4/Dockerfile @@ -4,7 +4,7 @@ FROM ushahidi/debian:buster-dockerize # same minor version ENV PHP_VERSION=7 \ PHP_MAJOR_VERSION=7.4 \ - PHP_MINOR_VERSION=7.4.16 \ + PHP_MINOR_VERSION=7.4.33 \ PHP_DOCKER_USH_BUILD_SEQ=1 # Install php, extensions and handy tools @@ -42,6 +42,7 @@ RUN apt-get update && \ RUN ln -sf /dev/stdout /var/log/nginx/access.log && \ ln -sf /dev/stderr /var/log/nginx/error.log ADD php-fpm.conf ${DOCKERIZE_TEMPLATE_DIR}/etc/php/${PHP_MAJOR_VERSION}/fpm/php-fpm.conf +ADD php-ush.ini ${DOCKERIZE_TEMPLATE_DIR}/etc/php/${PHP_MAJOR_VERSION}/fpm/conf.d/99-ush.ini # Install composer RUN curl -sS https://getcomposer.org/installer | \ diff --git a/php-fpm-nginx/8.0/Dockerfile b/php-fpm-nginx/8.0/Dockerfile index 16566ea..72eac9f 100644 --- a/php-fpm-nginx/8.0/Dockerfile +++ b/php-fpm-nginx/8.0/Dockerfile @@ -4,7 +4,7 @@ FROM ushahidi/debian:buster-dockerize # same minor version ENV PHP_VERSION=8 \ PHP_MAJOR_VERSION=8.0 \ - PHP_MINOR_VERSION=8.0.3 \ + PHP_MINOR_VERSION=8.0.29 \ PHP_DOCKER_USH_BUILD_SEQ=1 # Install php, extensions and handy tools @@ -42,6 +42,7 @@ RUN apt-get update && \ RUN ln -sf /dev/stdout /var/log/nginx/access.log && \ ln -sf /dev/stderr /var/log/nginx/error.log ADD php-fpm.conf ${DOCKERIZE_TEMPLATE_DIR}/etc/php/${PHP_MAJOR_VERSION}/fpm/php-fpm.conf +ADD php-ush.ini ${DOCKERIZE_TEMPLATE_DIR}/etc/php/${PHP_MAJOR_VERSION}/fpm/conf.d/99-ush.ini # Install composer RUN curl -sS https://getcomposer.org/installer | \ diff --git a/php-fpm-nginx/init.sh b/php-fpm-nginx/init.sh index 342960f..1dced7b 100755 --- a/php-fpm-nginx/init.sh +++ b/php-fpm-nginx/init.sh @@ -12,7 +12,8 @@ php_config() { } start() { - php_config + # DEPRECATED FOR php-ush con.d file + # php_config # Start the chaperone process if [[ $UID -eq 0 || $EUID -eq 0 ]]; then # root diff --git a/php-fpm-nginx/nginx-vhost.conf b/php-fpm-nginx/nginx-vhost.conf index 6044f2b..60b5eca 100644 --- a/php-fpm-nginx/nginx-vhost.conf +++ b/php-fpm-nginx/nginx-vhost.conf @@ -8,6 +8,8 @@ server { charset utf-8; override_charset on; + client_max_body_size {{ default .Env.PHP_UPLOAD_MAX_FILESIZE "2m" }}; + location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. diff --git a/php-fpm-nginx/php-ush.ini b/php-fpm-nginx/php-ush.ini new file mode 100644 index 0000000..ebf47e3 --- /dev/null +++ b/php-fpm-nginx/php-ush.ini @@ -0,0 +1,6 @@ +[PHP] +post_max_size = {{ default .Env.PHP_POST_MAX_SIZE "8M" }} +upload_max_filesize = {{ default .Env.PHP_UPLOAD_MAX_FILESIZE "2M" }} +memory_limit = {{ default .Env.PHP_MEMORY_LIMIT "128M" }} +max_execution_time = {{ default .Env.PHP_EXEC_TIME_LIMIT "900" }} +max_input_time = {{ default .Env.PHP_MAX_INPUT_TIME "60" }}