diff --git a/8.1-prod/Dockerfile b/8.1-prod/Dockerfile index 73972a4..042f76b 100644 --- a/8.1-prod/Dockerfile +++ b/8.1-prod/Dockerfile @@ -20,8 +20,8 @@ WORKDIR /app RUN adduser -D -u 1337 kool \ && addgroup kool www-data \ # dockerize - && ARCH="$( [ "$(uname -m)" = "aarch64" ] && echo arm64 || echo amd64 )" \ - && curl -L "https://github.com/jwilder/dockerize/releases/download/v0.9.3/dockerize-linux-${ARCH}-v0.9.3.tar.gz" | tar xz \ + && DOCKERIZE_ARCH="$( [ "$(uname -m)" = "aarch64" ] && echo arm64 || echo amd64 )" \ + && curl -L "https://github.com/jwilder/dockerize/releases/download/v0.9.3/dockerize-linux-${DOCKERIZE_ARCH}-v0.9.3.tar.gz" | tar xz \ && mv dockerize /usr/local/bin/dockerize \ # deps && apk --no-cache add su-exec bash sed git openssh-client icu shadow procps \ diff --git a/8.1-prod/zz-docker.conf b/8.1-prod/zz-docker.conf index c6988a1..33adb1b 100644 --- a/8.1-prod/zz-docker.conf +++ b/8.1-prod/zz-docker.conf @@ -29,6 +29,11 @@ listen = {{ .Env.PHP_FPM_LISTEN }} listen.owner = kool listen.group = kool +; Choose how the process manager will control the number of child processes. +; Possible Values: static, dynamic, ondemand (check www.conf for full documentation). +; Note: This value is mandatory. +{{ if or (eq .Env.PHP_FPM_PM "static") (eq .Env.PHP_FPM_PM "dynamic") (eq .Env.PHP_FPM_PM "ondemand") }}pm = {{ .Env.PHP_FPM_PM }}{{ else }}pm = dynamic{{ end }} + ; The number of child processes to be created when pm is set to 'static' and the ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. ; This value sets the limit on the number of simultaneous requests that will be diff --git a/8.1/Dockerfile b/8.1/Dockerfile index d0fc00a..f767f88 100644 --- a/8.1/Dockerfile +++ b/8.1/Dockerfile @@ -21,8 +21,8 @@ WORKDIR /app RUN adduser -D -u 1337 kool \ && addgroup kool www-data \ # dockerize - && ARCH="$( [ "$(uname -m)" = "aarch64" ] && echo arm64 || echo amd64 )" \ - && curl -L "https://github.com/jwilder/dockerize/releases/download/v0.9.3/dockerize-linux-${ARCH}-v0.9.3.tar.gz" | tar xz \ + && DOCKERIZE_ARCH="$( [ "$(uname -m)" = "aarch64" ] && echo arm64 || echo amd64 )" \ + && curl -L "https://github.com/jwilder/dockerize/releases/download/v0.9.3/dockerize-linux-${DOCKERIZE_ARCH}-v0.9.3.tar.gz" | tar xz \ && mv dockerize /usr/local/bin/dockerize \ # deps && apk --no-cache add su-exec bash sed git openssh-client icu shadow procps \ diff --git a/8.1/zz-docker.conf b/8.1/zz-docker.conf index c6988a1..33adb1b 100644 --- a/8.1/zz-docker.conf +++ b/8.1/zz-docker.conf @@ -29,6 +29,11 @@ listen = {{ .Env.PHP_FPM_LISTEN }} listen.owner = kool listen.group = kool +; Choose how the process manager will control the number of child processes. +; Possible Values: static, dynamic, ondemand (check www.conf for full documentation). +; Note: This value is mandatory. +{{ if or (eq .Env.PHP_FPM_PM "static") (eq .Env.PHP_FPM_PM "dynamic") (eq .Env.PHP_FPM_PM "ondemand") }}pm = {{ .Env.PHP_FPM_PM }}{{ else }}pm = dynamic{{ end }} + ; The number of child processes to be created when pm is set to 'static' and the ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. ; This value sets the limit on the number of simultaneous requests that will be diff --git a/8.2-prod/Dockerfile b/8.2-prod/Dockerfile index e99ca40..8572ca0 100644 --- a/8.2-prod/Dockerfile +++ b/8.2-prod/Dockerfile @@ -20,8 +20,8 @@ WORKDIR /app RUN adduser -D -u 1337 kool \ && addgroup kool www-data \ # dockerize - && ARCH="$( [ "$(uname -m)" = "aarch64" ] && echo arm64 || echo amd64 )" \ - && curl -L "https://github.com/jwilder/dockerize/releases/download/v0.9.3/dockerize-linux-${ARCH}-v0.9.3.tar.gz" | tar xz \ + && DOCKERIZE_ARCH="$( [ "$(uname -m)" = "aarch64" ] && echo arm64 || echo amd64 )" \ + && curl -L "https://github.com/jwilder/dockerize/releases/download/v0.9.3/dockerize-linux-${DOCKERIZE_ARCH}-v0.9.3.tar.gz" | tar xz \ && mv dockerize /usr/local/bin/dockerize \ # deps && apk --no-cache add su-exec bash sed git openssh-client icu shadow procps \ diff --git a/8.2-prod/zz-docker.conf b/8.2-prod/zz-docker.conf index c6988a1..33adb1b 100644 --- a/8.2-prod/zz-docker.conf +++ b/8.2-prod/zz-docker.conf @@ -29,6 +29,11 @@ listen = {{ .Env.PHP_FPM_LISTEN }} listen.owner = kool listen.group = kool +; Choose how the process manager will control the number of child processes. +; Possible Values: static, dynamic, ondemand (check www.conf for full documentation). +; Note: This value is mandatory. +{{ if or (eq .Env.PHP_FPM_PM "static") (eq .Env.PHP_FPM_PM "dynamic") (eq .Env.PHP_FPM_PM "ondemand") }}pm = {{ .Env.PHP_FPM_PM }}{{ else }}pm = dynamic{{ end }} + ; The number of child processes to be created when pm is set to 'static' and the ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. ; This value sets the limit on the number of simultaneous requests that will be diff --git a/8.2/Dockerfile b/8.2/Dockerfile index a08a73b..dc8136a 100644 --- a/8.2/Dockerfile +++ b/8.2/Dockerfile @@ -21,8 +21,8 @@ WORKDIR /app RUN adduser -D -u 1337 kool \ && addgroup kool www-data \ # dockerize - && ARCH="$( [ "$(uname -m)" = "aarch64" ] && echo arm64 || echo amd64 )" \ - && curl -L "https://github.com/jwilder/dockerize/releases/download/v0.9.3/dockerize-linux-${ARCH}-v0.9.3.tar.gz" | tar xz \ + && DOCKERIZE_ARCH="$( [ "$(uname -m)" = "aarch64" ] && echo arm64 || echo amd64 )" \ + && curl -L "https://github.com/jwilder/dockerize/releases/download/v0.9.3/dockerize-linux-${DOCKERIZE_ARCH}-v0.9.3.tar.gz" | tar xz \ && mv dockerize /usr/local/bin/dockerize \ # deps && apk --no-cache add su-exec bash sed git openssh-client icu shadow procps \ diff --git a/8.2/zz-docker.conf b/8.2/zz-docker.conf index c6988a1..33adb1b 100644 --- a/8.2/zz-docker.conf +++ b/8.2/zz-docker.conf @@ -29,6 +29,11 @@ listen = {{ .Env.PHP_FPM_LISTEN }} listen.owner = kool listen.group = kool +; Choose how the process manager will control the number of child processes. +; Possible Values: static, dynamic, ondemand (check www.conf for full documentation). +; Note: This value is mandatory. +{{ if or (eq .Env.PHP_FPM_PM "static") (eq .Env.PHP_FPM_PM "dynamic") (eq .Env.PHP_FPM_PM "ondemand") }}pm = {{ .Env.PHP_FPM_PM }}{{ else }}pm = dynamic{{ end }} + ; The number of child processes to be created when pm is set to 'static' and the ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. ; This value sets the limit on the number of simultaneous requests that will be diff --git a/8.3-prod/Dockerfile b/8.3-prod/Dockerfile index c9a42ce..6ba96cf 100644 --- a/8.3-prod/Dockerfile +++ b/8.3-prod/Dockerfile @@ -20,8 +20,8 @@ WORKDIR /app RUN adduser -D -u 1337 kool \ && addgroup kool www-data \ # dockerize - && ARCH="$( [ "$(uname -m)" = "aarch64" ] && echo arm64 || echo amd64 )" \ - && curl -L "https://github.com/jwilder/dockerize/releases/download/v0.9.3/dockerize-linux-${ARCH}-v0.9.3.tar.gz" | tar xz \ + && DOCKERIZE_ARCH="$( [ "$(uname -m)" = "aarch64" ] && echo arm64 || echo amd64 )" \ + && curl -L "https://github.com/jwilder/dockerize/releases/download/v0.9.3/dockerize-linux-${DOCKERIZE_ARCH}-v0.9.3.tar.gz" | tar xz \ && mv dockerize /usr/local/bin/dockerize \ # deps && apk --no-cache add su-exec bash sed git openssh-client icu shadow procps \ diff --git a/8.3-prod/zz-docker.conf b/8.3-prod/zz-docker.conf index c6988a1..33adb1b 100644 --- a/8.3-prod/zz-docker.conf +++ b/8.3-prod/zz-docker.conf @@ -29,6 +29,11 @@ listen = {{ .Env.PHP_FPM_LISTEN }} listen.owner = kool listen.group = kool +; Choose how the process manager will control the number of child processes. +; Possible Values: static, dynamic, ondemand (check www.conf for full documentation). +; Note: This value is mandatory. +{{ if or (eq .Env.PHP_FPM_PM "static") (eq .Env.PHP_FPM_PM "dynamic") (eq .Env.PHP_FPM_PM "ondemand") }}pm = {{ .Env.PHP_FPM_PM }}{{ else }}pm = dynamic{{ end }} + ; The number of child processes to be created when pm is set to 'static' and the ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. ; This value sets the limit on the number of simultaneous requests that will be diff --git a/8.3/Dockerfile b/8.3/Dockerfile index c0c3fb7..4d12e85 100644 --- a/8.3/Dockerfile +++ b/8.3/Dockerfile @@ -21,8 +21,8 @@ WORKDIR /app RUN adduser -D -u 1337 kool \ && addgroup kool www-data \ # dockerize - && ARCH="$( [ "$(uname -m)" = "aarch64" ] && echo arm64 || echo amd64 )" \ - && curl -L "https://github.com/jwilder/dockerize/releases/download/v0.9.3/dockerize-linux-${ARCH}-v0.9.3.tar.gz" | tar xz \ + && DOCKERIZE_ARCH="$( [ "$(uname -m)" = "aarch64" ] && echo arm64 || echo amd64 )" \ + && curl -L "https://github.com/jwilder/dockerize/releases/download/v0.9.3/dockerize-linux-${DOCKERIZE_ARCH}-v0.9.3.tar.gz" | tar xz \ && mv dockerize /usr/local/bin/dockerize \ # deps && apk --no-cache add su-exec bash sed git openssh-client icu shadow procps \ diff --git a/8.3/zz-docker.conf b/8.3/zz-docker.conf index c6988a1..33adb1b 100644 --- a/8.3/zz-docker.conf +++ b/8.3/zz-docker.conf @@ -29,6 +29,11 @@ listen = {{ .Env.PHP_FPM_LISTEN }} listen.owner = kool listen.group = kool +; Choose how the process manager will control the number of child processes. +; Possible Values: static, dynamic, ondemand (check www.conf for full documentation). +; Note: This value is mandatory. +{{ if or (eq .Env.PHP_FPM_PM "static") (eq .Env.PHP_FPM_PM "dynamic") (eq .Env.PHP_FPM_PM "ondemand") }}pm = {{ .Env.PHP_FPM_PM }}{{ else }}pm = dynamic{{ end }} + ; The number of child processes to be created when pm is set to 'static' and the ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. ; This value sets the limit on the number of simultaneous requests that will be diff --git a/8.4-prod/Dockerfile b/8.4-prod/Dockerfile index e598c23..6713397 100644 --- a/8.4-prod/Dockerfile +++ b/8.4-prod/Dockerfile @@ -20,8 +20,8 @@ WORKDIR /app RUN adduser -D -u 1337 kool \ && addgroup kool www-data \ # dockerize - && ARCH="$( [ "$(uname -m)" = "aarch64" ] && echo arm64 || echo amd64 )" \ - && curl -L "https://github.com/jwilder/dockerize/releases/download/v0.9.3/dockerize-linux-${ARCH}-v0.9.3.tar.gz" | tar xz \ + && DOCKERIZE_ARCH="$( [ "$(uname -m)" = "aarch64" ] && echo arm64 || echo amd64 )" \ + && curl -L "https://github.com/jwilder/dockerize/releases/download/v0.9.3/dockerize-linux-${DOCKERIZE_ARCH}-v0.9.3.tar.gz" | tar xz \ && mv dockerize /usr/local/bin/dockerize \ # deps && apk --no-cache add su-exec bash sed git openssh-client icu shadow procps \ diff --git a/8.4-prod/zz-docker.conf b/8.4-prod/zz-docker.conf index c6988a1..33adb1b 100644 --- a/8.4-prod/zz-docker.conf +++ b/8.4-prod/zz-docker.conf @@ -29,6 +29,11 @@ listen = {{ .Env.PHP_FPM_LISTEN }} listen.owner = kool listen.group = kool +; Choose how the process manager will control the number of child processes. +; Possible Values: static, dynamic, ondemand (check www.conf for full documentation). +; Note: This value is mandatory. +{{ if or (eq .Env.PHP_FPM_PM "static") (eq .Env.PHP_FPM_PM "dynamic") (eq .Env.PHP_FPM_PM "ondemand") }}pm = {{ .Env.PHP_FPM_PM }}{{ else }}pm = dynamic{{ end }} + ; The number of child processes to be created when pm is set to 'static' and the ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. ; This value sets the limit on the number of simultaneous requests that will be diff --git a/8.4/Dockerfile b/8.4/Dockerfile index 9cb9fc1..c6afb44 100644 --- a/8.4/Dockerfile +++ b/8.4/Dockerfile @@ -21,8 +21,8 @@ WORKDIR /app RUN adduser -D -u 1337 kool \ && addgroup kool www-data \ # dockerize - && ARCH="$( [ "$(uname -m)" = "aarch64" ] && echo arm64 || echo amd64 )" \ - && curl -L "https://github.com/jwilder/dockerize/releases/download/v0.9.3/dockerize-linux-${ARCH}-v0.9.3.tar.gz" | tar xz \ + && DOCKERIZE_ARCH="$( [ "$(uname -m)" = "aarch64" ] && echo arm64 || echo amd64 )" \ + && curl -L "https://github.com/jwilder/dockerize/releases/download/v0.9.3/dockerize-linux-${DOCKERIZE_ARCH}-v0.9.3.tar.gz" | tar xz \ && mv dockerize /usr/local/bin/dockerize \ # deps && apk --no-cache add su-exec bash sed git openssh-client icu shadow procps \ diff --git a/8.4/zz-docker.conf b/8.4/zz-docker.conf index c6988a1..33adb1b 100644 --- a/8.4/zz-docker.conf +++ b/8.4/zz-docker.conf @@ -29,6 +29,11 @@ listen = {{ .Env.PHP_FPM_LISTEN }} listen.owner = kool listen.group = kool +; Choose how the process manager will control the number of child processes. +; Possible Values: static, dynamic, ondemand (check www.conf for full documentation). +; Note: This value is mandatory. +{{ if or (eq .Env.PHP_FPM_PM "static") (eq .Env.PHP_FPM_PM "dynamic") (eq .Env.PHP_FPM_PM "ondemand") }}pm = {{ .Env.PHP_FPM_PM }}{{ else }}pm = dynamic{{ end }} + ; The number of child processes to be created when pm is set to 'static' and the ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. ; This value sets the limit on the number of simultaneous requests that will be diff --git a/README.md b/README.md index 8e82242..90d2ad9 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ Variable | Default Value | Description **PHP_POST_MAX_SIZE** | `25M` | Changes PHP max size of post data allowed **PHP_MAX_EXECUTION_TIME** | `30` | Changes PHP maximum time is allowed to run a script **PHP_FPM_LISTEN** | `9000` | Changes the PORT address of the FastCGI requests +**PHP_FPM_PM** | `dynamic` | PHP-FPM process manager strategy **PHP_FPM_MAX_CHILDREN** | `10` | Changes the number of child processes to be used on FPM **PHP_FPM_REQUEST_TERMINATE_TIMEOUT** | `60` | Changes FPM timeout to serve a single request diff --git a/template/zz-docker-conf.blade.php b/template/zz-docker-conf.blade.php index e36e567..54d4c2a 100644 --- a/template/zz-docker-conf.blade.php +++ b/template/zz-docker-conf.blade.php @@ -29,6 +29,11 @@ listen.owner = kool listen.group = kool +; Choose how the process manager will control the number of child processes. +; Possible Values: static, dynamic, ondemand (check www.conf for full documentation). +; Note: This value is mandatory. +@{{ if or (eq .Env.PHP_FPM_PM "static") (eq .Env.PHP_FPM_PM "dynamic") (eq .Env.PHP_FPM_PM "ondemand") }}pm = @{{ .Env.PHP_FPM_PM }}@{{ else }}pm = dynamic@{{ end }} + ; The number of child processes to be created when pm is set to 'static' and the ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. ; This value sets the limit on the number of simultaneous requests that will be