Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions dist/7.4/fpm-apache/etc/s6-overlay/s6-rc.d/apache2/data/check
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/command/with-contenv bash
response=$(curl --silent http://localhost/ping)

if [[ $response == "pong" ]]; then
exit 0
else
exit 1
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3
4 changes: 3 additions & 1 deletion dist/7.4/fpm-apache/etc/s6-overlay/s6-rc.d/apache2/run
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#!/command/with-contenv bash
#!/command/execlineb -P
with-contenv
s6-notifyoncheck
/usr/sbin/apache2ctl -DFOREGROUND
8 changes: 8 additions & 0 deletions dist/7.4/fpm-nginx/etc/s6-overlay/s6-rc.d/nginx/data/check
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/command/with-contenv bash
response=$(curl --silent http://localhost/ping)

if [[ $response == "pong" ]]; then
exit 0
else
exit 1
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3
4 changes: 3 additions & 1 deletion dist/7.4/fpm-nginx/etc/s6-overlay/s6-rc.d/nginx/run
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#!/command/execlineb
#!/command/execlineb -P
with-contenv
s6-notifyoncheck
nginx
7 changes: 5 additions & 2 deletions dist/7.4/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@ ENV PHP_DATE_TIMEZONE="UTC" \
# Install FPM
RUN apt-get update \
&& apt-get -y --no-install-recommends install \
php7.4-fpm \
&& echo "Allow pool name to be set via env, default it to 'www'..." \
php7.4-fpm libfcgi-bin\
&& echo "Allow pool name to be set via env, default it to 'www'..." \
&& sed -i -e 's/\[www\]/\[$\{PHP_POOL_NAME\}]/g' /etc/php/7.4/fpm/pool.d/www.conf \
&& echo "Install PHP-FPM Healthcheck script..." \
&& wget -O /usr/local/bin/php-fpm-healthcheck https://raw.githubusercontent.com/renatomefi/php-fpm-healthcheck/master/php-fpm-healthcheck \
&& chmod +x /usr/local/bin/php-fpm-healthcheck \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ pm.max_spare_servers = ${PHP_PM_MAX_SPARE_SERVERS}
; anything, but it may not be a good idea to use the .php extension or it
; may conflict with a real PHP file.
; Default Value: not set
;pm.status_path = /status
pm.status_path = /status

; The ping URI to call the monitoring page of FPM. If this value is not set, no
; URI will be recognized as a ping page. This could be used to test from outside
Expand Down
2 changes: 2 additions & 0 deletions dist/7.4/fpm/etc/s6-overlay/s6-rc.d/php-fpm/data/check
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/command/with-contenv bash
FCGI_CONNECT=/var/run/php/php-fpm.sock php-fpm-healthcheck
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3
9 changes: 3 additions & 6 deletions dist/7.4/fpm/etc/s6-overlay/s6-rc.d/php-fpm/run
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#!/command/with-contenv bash

# Switch to web user
su webuser

#Bring up PHP FPM
#!/command/execlineb -P
with-contenv
s6-notifyoncheck -d
exec /usr/sbin/php-fpm7.4 --nodaemonize
8 changes: 8 additions & 0 deletions dist/8.0/fpm-apache/etc/s6-overlay/s6-rc.d/apache2/data/check
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/command/with-contenv bash
response=$(curl --silent http://localhost/ping)

if [[ $response == "pong" ]]; then
exit 0
else
exit 1
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3
4 changes: 3 additions & 1 deletion dist/8.0/fpm-apache/etc/s6-overlay/s6-rc.d/apache2/run
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#!/command/with-contenv bash
#!/command/execlineb -P
with-contenv
s6-notifyoncheck
/usr/sbin/apache2ctl -DFOREGROUND
8 changes: 8 additions & 0 deletions dist/8.0/fpm-nginx/etc/s6-overlay/s6-rc.d/nginx/data/check
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/command/with-contenv bash
response=$(curl --silent http://localhost/ping)

if [[ $response == "pong" ]]; then
exit 0
else
exit 1
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3
4 changes: 3 additions & 1 deletion dist/8.0/fpm-nginx/etc/s6-overlay/s6-rc.d/nginx/run
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#!/command/execlineb
#!/command/execlineb -P
with-contenv
s6-notifyoncheck
nginx
7 changes: 5 additions & 2 deletions dist/8.0/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@ ENV PHP_DATE_TIMEZONE="UTC" \
# Install FPM
RUN apt-get update \
&& apt-get -y --no-install-recommends install \
php8.0-fpm \
&& echo "Allow pool name to be set via env, default it to 'www'..." \
php8.0-fpm libfcgi-bin\
&& echo "Allow pool name to be set via env, default it to 'www'..." \
&& sed -i -e 's/\[www\]/\[$\{PHP_POOL_NAME\}]/g' /etc/php/8.0/fpm/pool.d/www.conf \
&& echo "Install PHP-FPM Healthcheck script..." \
&& wget -O /usr/local/bin/php-fpm-healthcheck https://raw.githubusercontent.com/renatomefi/php-fpm-healthcheck/master/php-fpm-healthcheck \
&& chmod +x /usr/local/bin/php-fpm-healthcheck \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ pm.max_spare_servers = ${PHP_PM_MAX_SPARE_SERVERS}
; anything, but it may not be a good idea to use the .php extension or it
; may conflict with a real PHP file.
; Default Value: not set
;pm.status_path = /status
pm.status_path = /status

; The ping URI to call the monitoring page of FPM. If this value is not set, no
; URI will be recognized as a ping page. This could be used to test from outside
Expand Down
2 changes: 2 additions & 0 deletions dist/8.0/fpm/etc/s6-overlay/s6-rc.d/php-fpm/data/check
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/command/with-contenv bash
FCGI_CONNECT=/var/run/php/php-fpm.sock php-fpm-healthcheck
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3
9 changes: 3 additions & 6 deletions dist/8.0/fpm/etc/s6-overlay/s6-rc.d/php-fpm/run
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#!/command/with-contenv bash

# Switch to web user
su webuser

#Bring up PHP FPM
#!/command/execlineb -P
with-contenv
s6-notifyoncheck -d
exec /usr/sbin/php-fpm8.0 --nodaemonize
8 changes: 8 additions & 0 deletions dist/8.1/fpm-apache/etc/s6-overlay/s6-rc.d/apache2/data/check
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/command/with-contenv bash
response=$(curl --silent http://localhost/ping)

if [[ $response == "pong" ]]; then
exit 0
else
exit 1
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3
1 change: 1 addition & 0 deletions dist/8.1/fpm-apache/etc/s6-overlay/s6-rc.d/apache2/run
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/command/execlineb -P
with-contenv
s6-notifyoncheck
/usr/sbin/apache2ctl -DFOREGROUND
8 changes: 8 additions & 0 deletions dist/8.1/fpm-nginx/etc/s6-overlay/s6-rc.d/nginx/data/check
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/command/with-contenv bash
response=$(curl --silent http://localhost/ping)

if [[ $response == "pong" ]]; then
exit 0
else
exit 1
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3
1 change: 1 addition & 0 deletions dist/8.1/fpm-nginx/etc/s6-overlay/s6-rc.d/nginx/run
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/command/execlineb -P
with-contenv
s6-notifyoncheck
nginx
7 changes: 5 additions & 2 deletions dist/8.1/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@ ENV PHP_DATE_TIMEZONE="UTC" \
# Install FPM
RUN apt-get update \
&& apt-get -y --no-install-recommends install \
php8.1-fpm \
&& echo "Allow pool name to be set via env, default it to 'www'..." \
php8.1-fpm libfcgi-bin\
&& echo "Allow pool name to be set via env, default it to 'www'..." \
&& sed -i -e 's/\[www\]/\[$\{PHP_POOL_NAME\}]/g' /etc/php/8.1/fpm/pool.d/www.conf \
&& echo "Install PHP-FPM Healthcheck script..." \
&& wget -O /usr/local/bin/php-fpm-healthcheck https://raw.githubusercontent.com/renatomefi/php-fpm-healthcheck/master/php-fpm-healthcheck \
&& chmod +x /usr/local/bin/php-fpm-healthcheck \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ pm.max_spare_servers = ${PHP_PM_MAX_SPARE_SERVERS}
; anything, but it may not be a good idea to use the .php extension or it
; may conflict with a real PHP file.
; Default Value: not set
;pm.status_path = /status
pm.status_path = /status

; The ping URI to call the monitoring page of FPM. If this value is not set, no
; URI will be recognized as a ping page. This could be used to test from outside
Expand Down
2 changes: 2 additions & 0 deletions dist/8.1/fpm/etc/s6-overlay/s6-rc.d/php-fpm/data/check
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/command/with-contenv bash
FCGI_CONNECT=/var/run/php/php-fpm.sock php-fpm-healthcheck
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3
1 change: 1 addition & 0 deletions dist/8.1/fpm/etc/s6-overlay/s6-rc.d/php-fpm/run
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/command/execlineb -P
with-contenv
s6-notifyoncheck -d
exec /usr/sbin/php-fpm8.1 --nodaemonize
8 changes: 8 additions & 0 deletions src/fpm-apache/etc/s6-overlay/s6-rc.d/apache2/data/check
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/command/with-contenv bash
response=$(curl --silent http://localhost/ping)

if [[ $response == "pong" ]]; then
exit 0
else
exit 1
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3
1 change: 1 addition & 0 deletions src/fpm-apache/etc/s6-overlay/s6-rc.d/apache2/run
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/command/execlineb -P
with-contenv
s6-notifyoncheck
/usr/sbin/apache2ctl -DFOREGROUND
8 changes: 8 additions & 0 deletions src/fpm-nginx/etc/s6-overlay/s6-rc.d/nginx/data/check
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/command/with-contenv bash
response=$(curl --silent http://localhost/ping)

if [[ $response == "pong" ]]; then
exit 0
else
exit 1
fi
1 change: 1 addition & 0 deletions src/fpm-nginx/etc/s6-overlay/s6-rc.d/nginx/notification-fd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3
1 change: 1 addition & 0 deletions src/fpm-nginx/etc/s6-overlay/s6-rc.d/nginx/run
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/command/execlineb -P
with-contenv
s6-notifyoncheck
nginx
7 changes: 5 additions & 2 deletions src/fpm/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ ENV PHP_DATE_TIMEZONE="UTC" \
# Install FPM
RUN apt-get update \
&& apt-get -y --no-install-recommends install \
php{{ php_version }}-fpm \
&& echo "Allow pool name to be set via env, default it to 'www'..." \
php{{ php_version }}-fpm libfcgi-bin\
&& echo "Allow pool name to be set via env, default it to 'www'..." \
&& sed -i -e 's/\[www\]/\[$\{PHP_POOL_NAME\}]/g' /etc/php/{{ php_version }}/fpm/pool.d/www.conf \
&& echo "Install PHP-FPM Healthcheck script..." \
&& wget -O /usr/local/bin/php-fpm-healthcheck https://raw.githubusercontent.com/renatomefi/php-fpm-healthcheck/master/php-fpm-healthcheck \
&& chmod +x /usr/local/bin/php-fpm-healthcheck \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*

Expand Down
2 changes: 1 addition & 1 deletion src/fpm/etc/php/fpm/pool.d/y-override-php-defaults.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ pm.max_spare_servers = ${PHP_PM_MAX_SPARE_SERVERS}
; anything, but it may not be a good idea to use the .php extension or it
; may conflict with a real PHP file.
; Default Value: not set
;pm.status_path = /status
pm.status_path = /status

; The ping URI to call the monitoring page of FPM. If this value is not set, no
; URI will be recognized as a ping page. This could be used to test from outside
Expand Down
2 changes: 2 additions & 0 deletions src/fpm/etc/s6-overlay/s6-rc.d/php-fpm/data/check
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/command/with-contenv bash
FCGI_CONNECT=/var/run/php/php-fpm.sock php-fpm-healthcheck
1 change: 1 addition & 0 deletions src/fpm/etc/s6-overlay/s6-rc.d/php-fpm/notification-fd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3
1 change: 1 addition & 0 deletions src/fpm/etc/s6-overlay/s6-rc.d/php-fpm/run.j2
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/command/execlineb -P
with-contenv
s6-notifyoncheck -d
exec /usr/sbin/php-fpm{{ php_version }} --nodaemonize