From bcd3994338601e98e30c355d34559e901def8da8 Mon Sep 17 00:00:00 2001 From: Thomas Clavier Date: Sat, 23 Jul 2022 18:36:02 +0200 Subject: [PATCH] Configure pm.max_children from env var Signed-off-by: Thomas Clavier --- 22/apache/Dockerfile | 2 ++ 22/fpm/Dockerfile | 2 ++ 23/apache/Dockerfile | 2 ++ 23/fpm/Dockerfile | 2 ++ 24/apache/Dockerfile | 2 ++ 24/fpm/Dockerfile | 2 ++ Dockerfile-debian.template | 2 ++ 7 files changed, 14 insertions(+) diff --git a/22/apache/Dockerfile b/22/apache/Dockerfile index c287940884..dd134e5778 100644 --- a/22/apache/Dockerfile +++ b/22/apache/Dockerfile @@ -20,6 +20,7 @@ RUN set -ex; \ # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html ENV PHP_MEMORY_LIMIT 512M ENV PHP_UPLOAD_LIMIT 512M +ENV PHP_PM_MAX_CHILDREN 16 RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ @@ -105,6 +106,7 @@ RUN { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ + echo 'pm.max_children = ${PHP_PM_MAX_CHILDREN}'; \ } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ \ mkdir /var/www/data; \ diff --git a/22/fpm/Dockerfile b/22/fpm/Dockerfile index 9d5086ed78..636c9f3839 100644 --- a/22/fpm/Dockerfile +++ b/22/fpm/Dockerfile @@ -20,6 +20,7 @@ RUN set -ex; \ # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html ENV PHP_MEMORY_LIMIT 512M ENV PHP_UPLOAD_LIMIT 512M +ENV PHP_PM_MAX_CHILDREN 16 RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ @@ -105,6 +106,7 @@ RUN { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ + echo 'pm.max_children = ${PHP_PM_MAX_CHILDREN}'; \ } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ \ mkdir /var/www/data; \ diff --git a/23/apache/Dockerfile b/23/apache/Dockerfile index 9cd0738cde..def9fbd037 100644 --- a/23/apache/Dockerfile +++ b/23/apache/Dockerfile @@ -20,6 +20,7 @@ RUN set -ex; \ # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html ENV PHP_MEMORY_LIMIT 512M ENV PHP_UPLOAD_LIMIT 512M +ENV PHP_PM_MAX_CHILDREN 16 RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ @@ -105,6 +106,7 @@ RUN { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ + echo 'pm.max_children = ${PHP_PM_MAX_CHILDREN}'; \ } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ \ mkdir /var/www/data; \ diff --git a/23/fpm/Dockerfile b/23/fpm/Dockerfile index 807113369e..b53b909482 100644 --- a/23/fpm/Dockerfile +++ b/23/fpm/Dockerfile @@ -20,6 +20,7 @@ RUN set -ex; \ # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html ENV PHP_MEMORY_LIMIT 512M ENV PHP_UPLOAD_LIMIT 512M +ENV PHP_PM_MAX_CHILDREN 16 RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ @@ -105,6 +106,7 @@ RUN { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ + echo 'pm.max_children = ${PHP_PM_MAX_CHILDREN}'; \ } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ \ mkdir /var/www/data; \ diff --git a/24/apache/Dockerfile b/24/apache/Dockerfile index 7f8daa1275..0312d4cfd4 100644 --- a/24/apache/Dockerfile +++ b/24/apache/Dockerfile @@ -20,6 +20,7 @@ RUN set -ex; \ # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html ENV PHP_MEMORY_LIMIT 512M ENV PHP_UPLOAD_LIMIT 512M +ENV PHP_PM_MAX_CHILDREN 16 RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ @@ -105,6 +106,7 @@ RUN { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ + echo 'pm.max_children = ${PHP_PM_MAX_CHILDREN}'; \ } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ \ mkdir /var/www/data; \ diff --git a/24/fpm/Dockerfile b/24/fpm/Dockerfile index e8545524f4..4f7a9e51e5 100644 --- a/24/fpm/Dockerfile +++ b/24/fpm/Dockerfile @@ -20,6 +20,7 @@ RUN set -ex; \ # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html ENV PHP_MEMORY_LIMIT 512M ENV PHP_UPLOAD_LIMIT 512M +ENV PHP_PM_MAX_CHILDREN 16 RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ @@ -105,6 +106,7 @@ RUN { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ + echo 'pm.max_children = ${PHP_PM_MAX_CHILDREN}'; \ } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ \ mkdir /var/www/data; \ diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index a13f0e27be..75dcd378c1 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -19,6 +19,7 @@ RUN set -ex; \ # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html ENV PHP_MEMORY_LIMIT 512M ENV PHP_UPLOAD_LIMIT 512M +ENV PHP_PM_MAX_CHILDREN 16 RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ @@ -106,6 +107,7 @@ RUN { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ + echo 'pm.max_children = ${PHP_PM_MAX_CHILDREN}'; \ } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ \ mkdir /var/www/data; \