Skip to content

Commit eed984f

Browse files
authored
Merge pull request #110 from kool-dev/add-pm-env-var
add ability to change `pm` via env var
2 parents 1576216 + 717ce24 commit eed984f

File tree

18 files changed

+62
-16
lines changed

18 files changed

+62
-16
lines changed

8.1-prod/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ WORKDIR /app
2020
RUN adduser -D -u 1337 kool \
2121
&& addgroup kool www-data \
2222
# dockerize
23-
&& ARCH="$( [ "$(uname -m)" = "aarch64" ] && echo arm64 || echo amd64 )" \
24-
&& curl -L "https://github.com/jwilder/dockerize/releases/download/v0.9.3/dockerize-linux-${ARCH}-v0.9.3.tar.gz" | tar xz \
23+
&& DOCKERIZE_ARCH="$( [ "$(uname -m)" = "aarch64" ] && echo arm64 || echo amd64 )" \
24+
&& curl -L "https://github.com/jwilder/dockerize/releases/download/v0.9.3/dockerize-linux-${DOCKERIZE_ARCH}-v0.9.3.tar.gz" | tar xz \
2525
&& mv dockerize /usr/local/bin/dockerize \
2626
# deps
2727
&& apk --no-cache add su-exec bash sed git openssh-client icu shadow procps \

8.1-prod/zz-docker.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ listen = {{ .Env.PHP_FPM_LISTEN }}
2929
listen.owner = kool
3030
listen.group = kool
3131

32+
; Choose how the process manager will control the number of child processes.
33+
; Possible Values: static, dynamic, ondemand (check www.conf for full documentation).
34+
; Note: This value is mandatory.
35+
{{ 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 }}
36+
3237
; The number of child processes to be created when pm is set to 'static' and the
3338
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
3439
; This value sets the limit on the number of simultaneous requests that will be

8.1/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ WORKDIR /app
2121
RUN adduser -D -u 1337 kool \
2222
&& addgroup kool www-data \
2323
# dockerize
24-
&& ARCH="$( [ "$(uname -m)" = "aarch64" ] && echo arm64 || echo amd64 )" \
25-
&& curl -L "https://github.com/jwilder/dockerize/releases/download/v0.9.3/dockerize-linux-${ARCH}-v0.9.3.tar.gz" | tar xz \
24+
&& DOCKERIZE_ARCH="$( [ "$(uname -m)" = "aarch64" ] && echo arm64 || echo amd64 )" \
25+
&& curl -L "https://github.com/jwilder/dockerize/releases/download/v0.9.3/dockerize-linux-${DOCKERIZE_ARCH}-v0.9.3.tar.gz" | tar xz \
2626
&& mv dockerize /usr/local/bin/dockerize \
2727
# deps
2828
&& apk --no-cache add su-exec bash sed git openssh-client icu shadow procps \

8.1/zz-docker.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ listen = {{ .Env.PHP_FPM_LISTEN }}
2929
listen.owner = kool
3030
listen.group = kool
3131

32+
; Choose how the process manager will control the number of child processes.
33+
; Possible Values: static, dynamic, ondemand (check www.conf for full documentation).
34+
; Note: This value is mandatory.
35+
{{ 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 }}
36+
3237
; The number of child processes to be created when pm is set to 'static' and the
3338
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
3439
; This value sets the limit on the number of simultaneous requests that will be

8.2-prod/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ WORKDIR /app
2020
RUN adduser -D -u 1337 kool \
2121
&& addgroup kool www-data \
2222
# dockerize
23-
&& ARCH="$( [ "$(uname -m)" = "aarch64" ] && echo arm64 || echo amd64 )" \
24-
&& curl -L "https://github.com/jwilder/dockerize/releases/download/v0.9.3/dockerize-linux-${ARCH}-v0.9.3.tar.gz" | tar xz \
23+
&& DOCKERIZE_ARCH="$( [ "$(uname -m)" = "aarch64" ] && echo arm64 || echo amd64 )" \
24+
&& curl -L "https://github.com/jwilder/dockerize/releases/download/v0.9.3/dockerize-linux-${DOCKERIZE_ARCH}-v0.9.3.tar.gz" | tar xz \
2525
&& mv dockerize /usr/local/bin/dockerize \
2626
# deps
2727
&& apk --no-cache add su-exec bash sed git openssh-client icu shadow procps \

8.2-prod/zz-docker.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ listen = {{ .Env.PHP_FPM_LISTEN }}
2929
listen.owner = kool
3030
listen.group = kool
3131

32+
; Choose how the process manager will control the number of child processes.
33+
; Possible Values: static, dynamic, ondemand (check www.conf for full documentation).
34+
; Note: This value is mandatory.
35+
{{ 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 }}
36+
3237
; The number of child processes to be created when pm is set to 'static' and the
3338
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
3439
; This value sets the limit on the number of simultaneous requests that will be

8.2/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ WORKDIR /app
2121
RUN adduser -D -u 1337 kool \
2222
&& addgroup kool www-data \
2323
# dockerize
24-
&& ARCH="$( [ "$(uname -m)" = "aarch64" ] && echo arm64 || echo amd64 )" \
25-
&& curl -L "https://github.com/jwilder/dockerize/releases/download/v0.9.3/dockerize-linux-${ARCH}-v0.9.3.tar.gz" | tar xz \
24+
&& DOCKERIZE_ARCH="$( [ "$(uname -m)" = "aarch64" ] && echo arm64 || echo amd64 )" \
25+
&& curl -L "https://github.com/jwilder/dockerize/releases/download/v0.9.3/dockerize-linux-${DOCKERIZE_ARCH}-v0.9.3.tar.gz" | tar xz \
2626
&& mv dockerize /usr/local/bin/dockerize \
2727
# deps
2828
&& apk --no-cache add su-exec bash sed git openssh-client icu shadow procps \

8.2/zz-docker.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ listen = {{ .Env.PHP_FPM_LISTEN }}
2929
listen.owner = kool
3030
listen.group = kool
3131

32+
; Choose how the process manager will control the number of child processes.
33+
; Possible Values: static, dynamic, ondemand (check www.conf for full documentation).
34+
; Note: This value is mandatory.
35+
{{ 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 }}
36+
3237
; The number of child processes to be created when pm is set to 'static' and the
3338
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
3439
; This value sets the limit on the number of simultaneous requests that will be

8.3-prod/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ WORKDIR /app
2020
RUN adduser -D -u 1337 kool \
2121
&& addgroup kool www-data \
2222
# dockerize
23-
&& ARCH="$( [ "$(uname -m)" = "aarch64" ] && echo arm64 || echo amd64 )" \
24-
&& curl -L "https://github.com/jwilder/dockerize/releases/download/v0.9.3/dockerize-linux-${ARCH}-v0.9.3.tar.gz" | tar xz \
23+
&& DOCKERIZE_ARCH="$( [ "$(uname -m)" = "aarch64" ] && echo arm64 || echo amd64 )" \
24+
&& curl -L "https://github.com/jwilder/dockerize/releases/download/v0.9.3/dockerize-linux-${DOCKERIZE_ARCH}-v0.9.3.tar.gz" | tar xz \
2525
&& mv dockerize /usr/local/bin/dockerize \
2626
# deps
2727
&& apk --no-cache add su-exec bash sed git openssh-client icu shadow procps \

8.3-prod/zz-docker.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ listen = {{ .Env.PHP_FPM_LISTEN }}
2929
listen.owner = kool
3030
listen.group = kool
3131

32+
; Choose how the process manager will control the number of child processes.
33+
; Possible Values: static, dynamic, ondemand (check www.conf for full documentation).
34+
; Note: This value is mandatory.
35+
{{ 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 }}
36+
3237
; The number of child processes to be created when pm is set to 'static' and the
3338
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
3439
; This value sets the limit on the number of simultaneous requests that will be

0 commit comments

Comments
 (0)