From ad4ea63cb84f2b73c703a369b2d4606d2066ac37 Mon Sep 17 00:00:00 2001 From: cytopia Date: Wed, 1 Aug 2018 09:34:29 +0200 Subject: [PATCH 01/24] Fix PS1 prompt --- Dockerfiles/work/data/bash-devilbox | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Dockerfiles/work/data/bash-devilbox b/Dockerfiles/work/data/bash-devilbox index 15ba0d12..5fea5f9e 100644 --- a/Dockerfiles/work/data/bash-devilbox +++ b/Dockerfiles/work/data/bash-devilbox @@ -15,7 +15,15 @@ alias ll='ls -alp --color=always --group-directories-first' alias ..='cd ..' # Nice PS1 -PS1="\[\e[0;31m\]$(whoami)\[\e[0m\]@\[\e[0;36m\]php-$(php -v|head -1|grep -Eo '[0-9.]+'|head -1)\[\e[0m\] in \[\e[0;34m\]\w \[\e[0m\]\$ " +_clr_usr='\[\e[0;31m\]' +_clr_ver='\[\e[0;36m\]' +_clr_dir='\[\e[0;34m\]' +_clr_off='\[\e[0m\]' +PS1_PHP="$( php -v 2>/dev/null | grep -Eo '^PHP\s([-_.a-z0-9])+' )" +PS1_PHP="${PS1_PHP//PHP[[:space:]]}" +PS1_USR="$( whoami )" +PS1="${_clr_usr}${PS1_USR}${_clr_off}@${_clr_ver}php-${PS1_PHP}${_clr_off} in ${_clr_dir}\w${_clr_off} \$ " + # Show Intro echo From 866187143187eba67d89b7aa32daad303501c6de Mon Sep 17 00:00:00 2001 From: cytopia Date: Wed, 1 Aug 2018 09:34:59 +0200 Subject: [PATCH 02/24] Improve PHP-FPM performance --- Dockerfiles/base/data/php-fpm.d/pool.conf | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/Dockerfiles/base/data/php-fpm.d/pool.conf b/Dockerfiles/base/data/php-fpm.d/pool.conf index 25d78228..97b53999 100644 --- a/Dockerfiles/base/data/php-fpm.d/pool.conf +++ b/Dockerfiles/base/data/php-fpm.d/pool.conf @@ -1,7 +1,24 @@ [www] +# The number of child processes is set dynamically based on the following directives: +# pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. pm = dynamic -pm.max_children = 20 -pm.start_servers = 10 + +# The maximum number of child processes to be created +pm.max_children = 50 + +# The number of child processes created on startup. Used only when pm is set to dynamic. +# Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 5 + +# The desired minimum number of idle server processes. pm.min_spare_servers = 5 -pm.max_spare_servers = 10 + +# The desired maximum number of idle server processes. +pm.max_spare_servers = 35 + +# The number of requests each child process should execute before respawning. +# This can be useful to work around memory leaks in 3rd party libraries. +# For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +# Default value: 0. +pm.max_requests = 500 From f9e78cf4186839d2519071ffac5c803df263c212 Mon Sep 17 00:00:00 2001 From: cytopia Date: Wed, 1 Aug 2018 10:37:10 +0200 Subject: [PATCH 03/24] Apply tested configuration --- Dockerfiles/base/data/php-fpm.d/pool.conf | 26 +++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Dockerfiles/base/data/php-fpm.d/pool.conf b/Dockerfiles/base/data/php-fpm.d/pool.conf index 97b53999..79f9d87f 100644 --- a/Dockerfiles/base/data/php-fpm.d/pool.conf +++ b/Dockerfiles/base/data/php-fpm.d/pool.conf @@ -1,24 +1,24 @@ [www] -# The number of child processes is set dynamically based on the following directives: -# pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; The number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. pm = dynamic -# The maximum number of child processes to be created +; The maximum number of child processes to be created pm.max_children = 50 -# The number of child processes created on startup. Used only when pm is set to dynamic. -# Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. -pm.start_servers = 5 +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 10 -# The desired minimum number of idle server processes. +; The desired minimum number of idle server processes. pm.min_spare_servers = 5 -# The desired maximum number of idle server processes. -pm.max_spare_servers = 35 +; The desired maximum number of idle server processes. +pm.max_spare_servers = 15 -# The number of requests each child process should execute before respawning. -# This can be useful to work around memory leaks in 3rd party libraries. -# For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -# Default value: 0. +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. pm.max_requests = 500 From 523c936f6539c4b9755f6314c2f95694f879e973 Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 2 Aug 2018 13:12:12 +0200 Subject: [PATCH 04/24] Make php configuration generatable via Ansible --- Dockerfiles/base/Dockerfile-5.3 | 8 +- Dockerfiles/base/Dockerfile-5.4 | 7 +- Dockerfiles/base/Dockerfile-5.5 | 7 +- Dockerfiles/base/Dockerfile-5.6 | 7 +- Dockerfiles/base/Dockerfile-7.0 | 7 +- Dockerfiles/base/Dockerfile-7.1 | 7 +- Dockerfiles/base/Dockerfile-7.2 | 7 +- Dockerfiles/base/Dockerfile-7.3 | 7 +- .../php-fpm-5.3.conf} | 0 .../base/data/php-fpm.conf/php-fpm-5.4.conf | 3 + .../base/data/php-fpm.conf/php-fpm-5.5.conf | 3 + .../base/data/php-fpm.conf/php-fpm-5.6.conf | 3 + .../base/data/php-fpm.conf/php-fpm-7.0.conf | 3 + .../base/data/php-fpm.conf/php-fpm-7.1.conf | 3 + .../base/data/php-fpm.conf/php-fpm-7.2.conf | 3 + .../base/data/php-fpm.conf/php-fpm-7.3.conf | 3 + .../base/data/php-fpm.d-docker-5.3.conf | 10 - Dockerfiles/base/data/php-fpm.d/docker.conf | 10 - Dockerfiles/base/data/php-fpm.d/listen.conf | 3 - Dockerfiles/base/data/php-fpm.d/logfiles.conf | 6 - Dockerfiles/base/data/php-fpm.d/loglevel.conf | 2 - .../base/data/php-fpm.d/php-fpm.d-5.3.conf | 98 ++++++++ .../base/data/php-fpm.d/php-fpm.d-5.4.conf | 100 ++++++++ .../base/data/php-fpm.d/php-fpm.d-5.5.conf | 100 ++++++++ .../base/data/php-fpm.d/php-fpm.d-5.6.conf | 100 ++++++++ .../base/data/php-fpm.d/php-fpm.d-7.0.conf | 100 ++++++++ .../base/data/php-fpm.d/php-fpm.d-7.1.conf | 100 ++++++++ .../base/data/php-fpm.d/php-fpm.d-7.2.conf | 99 ++++++++ .../base/data/php-fpm.d/php-fpm.d-7.3.conf | 99 ++++++++ Dockerfiles/base/data/php-fpm.d/pool.conf | 24 -- Dockerfiles/base/data/php-fpm.d/user.conf | 5 - .../data/{php.d => php-ini.d}/php-5.3.ini | 9 +- .../data/{php.d => php-ini.d}/php-5.4.ini | 9 +- .../data/{php.d => php-ini.d}/php-5.5.ini | 9 +- .../data/{php.d => php-ini.d}/php-5.6.ini | 9 +- .../data/{php.d => php-ini.d}/php-7.0.ini | 9 +- .../data/{php.d => php-ini.d}/php-7.1.ini | 9 +- .../data/{php.d => php-ini.d}/php-7.2.ini | 9 +- .../data/{php.d => php-ini.d}/php-7.3.ini | 9 +- Dockerfiles/prod/Dockerfile-5.3 | 1 - Dockerfiles/prod/Dockerfile-5.4 | 1 - Dockerfiles/prod/Dockerfile-5.5 | 1 - Dockerfiles/prod/Dockerfile-5.6 | 1 - Dockerfiles/prod/Dockerfile-7.0 | 1 - Dockerfiles/prod/Dockerfile-7.1 | 1 - Dockerfiles/prod/Dockerfile-7.2 | 1 - Dockerfiles/prod/Dockerfile-7.3 | 1 - Dockerfiles/prod/data/php.d/php-5.3.ini | 9 - Dockerfiles/prod/data/php.d/php-5.4.ini | 9 - Dockerfiles/prod/data/php.d/php-5.5.ini | 9 - Dockerfiles/prod/data/php.d/php-5.6.ini | 9 - Dockerfiles/prod/data/php.d/php-7.0.ini | 9 - Dockerfiles/prod/data/php.d/php-7.1.ini | 9 - Dockerfiles/prod/data/php.d/php-7.2.ini | 9 - Dockerfiles/prod/data/php.d/php-7.3.ini | 9 - Dockerfiles/work/Dockerfile-5.3 | 6 +- Dockerfiles/work/Dockerfile-5.4 | 6 +- Dockerfiles/work/Dockerfile-5.5 | 6 +- Dockerfiles/work/Dockerfile-5.6 | 6 +- Dockerfiles/work/Dockerfile-7.0 | 6 +- Dockerfiles/work/Dockerfile-7.1 | 6 +- Dockerfiles/work/Dockerfile-7.2 | 6 +- Dockerfiles/work/Dockerfile-7.3 | 6 +- .../work/data/php-fpm.conf/php-fpm-5.3.conf | 3 + .../work/data/php-fpm.conf/php-fpm-5.4.conf | 3 + .../work/data/php-fpm.conf/php-fpm-5.5.conf | 3 + .../work/data/php-fpm.conf/php-fpm-5.6.conf | 3 + .../work/data/php-fpm.conf/php-fpm-7.0.conf | 3 + .../work/data/php-fpm.conf/php-fpm-7.1.conf | 3 + .../work/data/php-fpm.conf/php-fpm-7.2.conf | 3 + .../work/data/php-fpm.conf/php-fpm-7.3.conf | 3 + .../work/data/php-fpm.d/php-fpm.d-5.3.conf | 98 ++++++++ .../work/data/php-fpm.d/php-fpm.d-5.4.conf | 100 ++++++++ .../work/data/php-fpm.d/php-fpm.d-5.5.conf | 100 ++++++++ .../work/data/php-fpm.d/php-fpm.d-5.6.conf | 100 ++++++++ .../work/data/php-fpm.d/php-fpm.d-7.0.conf | 100 ++++++++ .../work/data/php-fpm.d/php-fpm.d-7.1.conf | 100 ++++++++ .../work/data/php-fpm.d/php-fpm.d-7.2.conf | 99 ++++++++ .../work/data/php-fpm.d/php-fpm.d-7.3.conf | 99 ++++++++ Dockerfiles/work/data/php-ini.d/php-5.3.ini | 42 ++++ Dockerfiles/work/data/php-ini.d/php-5.4.ini | 43 ++++ Dockerfiles/work/data/php-ini.d/php-5.5.ini | 43 ++++ Dockerfiles/work/data/php-ini.d/php-5.6.ini | 43 ++++ Dockerfiles/work/data/php-ini.d/php-7.0.ini | 43 ++++ Dockerfiles/work/data/php-ini.d/php-7.1.ini | 43 ++++ Dockerfiles/work/data/php-ini.d/php-7.2.ini | 42 ++++ Dockerfiles/work/data/php-ini.d/php-7.3.ini | 42 ++++ Dockerfiles/work/data/php.d/php-5.3.ini | 17 -- Dockerfiles/work/data/php.d/php-5.4.ini | 17 -- Dockerfiles/work/data/php.d/php-5.5.ini | 17 -- Dockerfiles/work/data/php.d/php-5.6.ini | 17 -- Dockerfiles/work/data/php.d/php-7.0.ini | 17 -- Dockerfiles/work/data/php.d/php-7.1.ini | 17 -- Dockerfiles/work/data/php.d/php-7.2.ini | 16 -- Dockerfiles/work/data/php.d/php-7.3.ini | 16 -- build/ansible/CONFIGURATION/php-base.ini.j2 | 48 ---- build/ansible/CONFIGURATION/php-prod.ini.j2 | 9 - build/ansible/CONFIGURATION/php-work.ini.j2 | 19 -- build/ansible/CONFIGURATIONS/php-fpm.conf.j2 | 163 +++++++++++++ .../ansible/CONFIGURATIONS/php-fpm.d-conf.j2 | 110 +++++++++ build/ansible/CONFIGURATIONS/php.ini.j2 | 49 ++++ build/ansible/DOCKERFILES/Dockerfile-base.j2 | 14 +- build/ansible/DOCKERFILES/Dockerfile-prod.j2 | 1 - build/ansible/DOCKERFILES/Dockerfile-work.j2 | 6 +- build/ansible/group_vars/all.yml | 228 ++++++++++++++++-- build/ansible/roles/template/tasks/main.yml | 8 +- 106 files changed, 2624 insertions(+), 460 deletions(-) rename Dockerfiles/base/data/{php-fpm.conf => php-fpm.conf/php-fpm-5.3.conf} (100%) create mode 100644 Dockerfiles/base/data/php-fpm.conf/php-fpm-5.4.conf create mode 100644 Dockerfiles/base/data/php-fpm.conf/php-fpm-5.5.conf create mode 100644 Dockerfiles/base/data/php-fpm.conf/php-fpm-5.6.conf create mode 100644 Dockerfiles/base/data/php-fpm.conf/php-fpm-7.0.conf create mode 100644 Dockerfiles/base/data/php-fpm.conf/php-fpm-7.1.conf create mode 100644 Dockerfiles/base/data/php-fpm.conf/php-fpm-7.2.conf create mode 100644 Dockerfiles/base/data/php-fpm.conf/php-fpm-7.3.conf delete mode 100644 Dockerfiles/base/data/php-fpm.d-docker-5.3.conf delete mode 100644 Dockerfiles/base/data/php-fpm.d/docker.conf delete mode 100644 Dockerfiles/base/data/php-fpm.d/listen.conf delete mode 100644 Dockerfiles/base/data/php-fpm.d/logfiles.conf delete mode 100644 Dockerfiles/base/data/php-fpm.d/loglevel.conf create mode 100644 Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.3.conf create mode 100644 Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.4.conf create mode 100644 Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.5.conf create mode 100644 Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.6.conf create mode 100644 Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.0.conf create mode 100644 Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.1.conf create mode 100644 Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.2.conf create mode 100644 Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.3.conf delete mode 100644 Dockerfiles/base/data/php-fpm.d/pool.conf delete mode 100644 Dockerfiles/base/data/php-fpm.d/user.conf rename Dockerfiles/base/data/{php.d => php-ini.d}/php-5.3.ini (79%) rename Dockerfiles/base/data/{php.d => php-ini.d}/php-5.4.ini (80%) rename Dockerfiles/base/data/{php.d => php-ini.d}/php-5.5.ini (80%) rename Dockerfiles/base/data/{php.d => php-ini.d}/php-5.6.ini (80%) rename Dockerfiles/base/data/{php.d => php-ini.d}/php-7.0.ini (80%) rename Dockerfiles/base/data/{php.d => php-ini.d}/php-7.1.ini (80%) rename Dockerfiles/base/data/{php.d => php-ini.d}/php-7.2.ini (79%) rename Dockerfiles/base/data/{php.d => php-ini.d}/php-7.3.ini (79%) delete mode 100644 Dockerfiles/prod/data/php.d/php-5.3.ini delete mode 100644 Dockerfiles/prod/data/php.d/php-5.4.ini delete mode 100644 Dockerfiles/prod/data/php.d/php-5.5.ini delete mode 100644 Dockerfiles/prod/data/php.d/php-5.6.ini delete mode 100644 Dockerfiles/prod/data/php.d/php-7.0.ini delete mode 100644 Dockerfiles/prod/data/php.d/php-7.1.ini delete mode 100644 Dockerfiles/prod/data/php.d/php-7.2.ini delete mode 100644 Dockerfiles/prod/data/php.d/php-7.3.ini create mode 100644 Dockerfiles/work/data/php-fpm.conf/php-fpm-5.3.conf create mode 100644 Dockerfiles/work/data/php-fpm.conf/php-fpm-5.4.conf create mode 100644 Dockerfiles/work/data/php-fpm.conf/php-fpm-5.5.conf create mode 100644 Dockerfiles/work/data/php-fpm.conf/php-fpm-5.6.conf create mode 100644 Dockerfiles/work/data/php-fpm.conf/php-fpm-7.0.conf create mode 100644 Dockerfiles/work/data/php-fpm.conf/php-fpm-7.1.conf create mode 100644 Dockerfiles/work/data/php-fpm.conf/php-fpm-7.2.conf create mode 100644 Dockerfiles/work/data/php-fpm.conf/php-fpm-7.3.conf create mode 100644 Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.3.conf create mode 100644 Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.4.conf create mode 100644 Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.5.conf create mode 100644 Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.6.conf create mode 100644 Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.0.conf create mode 100644 Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.1.conf create mode 100644 Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.2.conf create mode 100644 Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.3.conf create mode 100644 Dockerfiles/work/data/php-ini.d/php-5.3.ini create mode 100644 Dockerfiles/work/data/php-ini.d/php-5.4.ini create mode 100644 Dockerfiles/work/data/php-ini.d/php-5.5.ini create mode 100644 Dockerfiles/work/data/php-ini.d/php-5.6.ini create mode 100644 Dockerfiles/work/data/php-ini.d/php-7.0.ini create mode 100644 Dockerfiles/work/data/php-ini.d/php-7.1.ini create mode 100644 Dockerfiles/work/data/php-ini.d/php-7.2.ini create mode 100644 Dockerfiles/work/data/php-ini.d/php-7.3.ini delete mode 100644 Dockerfiles/work/data/php.d/php-5.3.ini delete mode 100644 Dockerfiles/work/data/php.d/php-5.4.ini delete mode 100644 Dockerfiles/work/data/php.d/php-5.5.ini delete mode 100644 Dockerfiles/work/data/php.d/php-5.6.ini delete mode 100644 Dockerfiles/work/data/php.d/php-7.0.ini delete mode 100644 Dockerfiles/work/data/php.d/php-7.1.ini delete mode 100644 Dockerfiles/work/data/php.d/php-7.2.ini delete mode 100644 Dockerfiles/work/data/php.d/php-7.3.ini delete mode 100644 build/ansible/CONFIGURATION/php-base.ini.j2 delete mode 100644 build/ansible/CONFIGURATION/php-prod.ini.j2 delete mode 100644 build/ansible/CONFIGURATION/php-work.ini.j2 create mode 100644 build/ansible/CONFIGURATIONS/php-fpm.conf.j2 create mode 100644 build/ansible/CONFIGURATIONS/php-fpm.d-conf.j2 create mode 100644 build/ansible/CONFIGURATIONS/php.ini.j2 diff --git a/Dockerfiles/base/Dockerfile-5.3 b/Dockerfiles/base/Dockerfile-5.3 index f1f19ae2..3099e99c 100644 --- a/Dockerfiles/base/Dockerfile-5.3 +++ b/Dockerfiles/base/Dockerfile-5.3 @@ -56,12 +56,12 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-5.3.ini /usr/local/etc/php/conf.d/yyy-devilbox-01-base.ini +COPY ./data/php-ini.d/php-5.3.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-fpm.conf/php-fpm-5.3.conf /usr/local/etc/php-fpm.conf +COPY ./data/php-fpm.d/php-fpm.d-5.3.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf + COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d /docker-entrypoint.d -COPY ./data/php-fpm.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d /usr/local/etc/php-fpm.d -COPY ./data/php-fpm.d-docker-5.3.conf /usr/local/etc/php-fpm.d/docker.conf ### diff --git a/Dockerfiles/base/Dockerfile-5.4 b/Dockerfiles/base/Dockerfile-5.4 index 167f9195..444663b4 100644 --- a/Dockerfiles/base/Dockerfile-5.4 +++ b/Dockerfiles/base/Dockerfile-5.4 @@ -56,11 +56,12 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-5.4.ini /usr/local/etc/php/conf.d/yyy-devilbox-01-base.ini +COPY ./data/php-ini.d/php-5.4.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-fpm.conf/php-fpm-5.4.conf /usr/local/etc/php-fpm.conf +COPY ./data/php-fpm.d/php-fpm.d-5.4.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf + COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d /docker-entrypoint.d -COPY ./data/php-fpm.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d /usr/local/etc/php-fpm.d ### diff --git a/Dockerfiles/base/Dockerfile-5.5 b/Dockerfiles/base/Dockerfile-5.5 index d184f9af..276c0220 100644 --- a/Dockerfiles/base/Dockerfile-5.5 +++ b/Dockerfiles/base/Dockerfile-5.5 @@ -56,11 +56,12 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-5.5.ini /usr/local/etc/php/conf.d/yyy-devilbox-01-base.ini +COPY ./data/php-ini.d/php-5.5.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-fpm.conf/php-fpm-5.5.conf /usr/local/etc/php-fpm.conf +COPY ./data/php-fpm.d/php-fpm.d-5.5.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf + COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d /docker-entrypoint.d -COPY ./data/php-fpm.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d /usr/local/etc/php-fpm.d ### diff --git a/Dockerfiles/base/Dockerfile-5.6 b/Dockerfiles/base/Dockerfile-5.6 index 71c9f4bc..5893221f 100644 --- a/Dockerfiles/base/Dockerfile-5.6 +++ b/Dockerfiles/base/Dockerfile-5.6 @@ -56,11 +56,12 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-5.6.ini /usr/local/etc/php/conf.d/yyy-devilbox-01-base.ini +COPY ./data/php-ini.d/php-5.6.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-fpm.conf/php-fpm-5.6.conf /usr/local/etc/php-fpm.conf +COPY ./data/php-fpm.d/php-fpm.d-5.6.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf + COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d /docker-entrypoint.d -COPY ./data/php-fpm.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d /usr/local/etc/php-fpm.d ### diff --git a/Dockerfiles/base/Dockerfile-7.0 b/Dockerfiles/base/Dockerfile-7.0 index 5430c30a..b213de2d 100644 --- a/Dockerfiles/base/Dockerfile-7.0 +++ b/Dockerfiles/base/Dockerfile-7.0 @@ -56,11 +56,12 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-7.0.ini /usr/local/etc/php/conf.d/yyy-devilbox-01-base.ini +COPY ./data/php-ini.d/php-7.0.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-fpm.conf/php-fpm-7.0.conf /usr/local/etc/php-fpm.conf +COPY ./data/php-fpm.d/php-fpm.d-7.0.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf + COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d /docker-entrypoint.d -COPY ./data/php-fpm.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d /usr/local/etc/php-fpm.d ### diff --git a/Dockerfiles/base/Dockerfile-7.1 b/Dockerfiles/base/Dockerfile-7.1 index 9a267cdf..f4a8bc75 100644 --- a/Dockerfiles/base/Dockerfile-7.1 +++ b/Dockerfiles/base/Dockerfile-7.1 @@ -56,11 +56,12 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-7.1.ini /usr/local/etc/php/conf.d/yyy-devilbox-01-base.ini +COPY ./data/php-ini.d/php-7.1.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-fpm.conf/php-fpm-7.1.conf /usr/local/etc/php-fpm.conf +COPY ./data/php-fpm.d/php-fpm.d-7.1.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf + COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d /docker-entrypoint.d -COPY ./data/php-fpm.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d /usr/local/etc/php-fpm.d ### diff --git a/Dockerfiles/base/Dockerfile-7.2 b/Dockerfiles/base/Dockerfile-7.2 index 381de2fc..c34d6a51 100644 --- a/Dockerfiles/base/Dockerfile-7.2 +++ b/Dockerfiles/base/Dockerfile-7.2 @@ -56,11 +56,12 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-7.2.ini /usr/local/etc/php/conf.d/yyy-devilbox-01-base.ini +COPY ./data/php-ini.d/php-7.2.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-fpm.conf/php-fpm-7.2.conf /usr/local/etc/php-fpm.conf +COPY ./data/php-fpm.d/php-fpm.d-7.2.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf + COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d /docker-entrypoint.d -COPY ./data/php-fpm.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d /usr/local/etc/php-fpm.d ### diff --git a/Dockerfiles/base/Dockerfile-7.3 b/Dockerfiles/base/Dockerfile-7.3 index aa82ff03..87cb9e91 100644 --- a/Dockerfiles/base/Dockerfile-7.3 +++ b/Dockerfiles/base/Dockerfile-7.3 @@ -56,11 +56,12 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-7.3.ini /usr/local/etc/php/conf.d/yyy-devilbox-01-base.ini +COPY ./data/php-ini.d/php-7.3.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-fpm.conf/php-fpm-7.3.conf /usr/local/etc/php-fpm.conf +COPY ./data/php-fpm.d/php-fpm.d-7.3.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf + COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d /docker-entrypoint.d -COPY ./data/php-fpm.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d /usr/local/etc/php-fpm.d ### diff --git a/Dockerfiles/base/data/php-fpm.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.3.conf similarity index 100% rename from Dockerfiles/base/data/php-fpm.conf rename to Dockerfiles/base/data/php-fpm.conf/php-fpm-5.3.conf diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.4.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.4.conf new file mode 100644 index 00000000..370fe706 --- /dev/null +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.4.conf @@ -0,0 +1,3 @@ +[global] +daemonize = no +include = /usr/local/etc/php-fpm.d/*.conf diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.5.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.5.conf new file mode 100644 index 00000000..370fe706 --- /dev/null +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.5.conf @@ -0,0 +1,3 @@ +[global] +daemonize = no +include = /usr/local/etc/php-fpm.d/*.conf diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.6.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.6.conf new file mode 100644 index 00000000..370fe706 --- /dev/null +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.6.conf @@ -0,0 +1,3 @@ +[global] +daemonize = no +include = /usr/local/etc/php-fpm.d/*.conf diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.0.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.0.conf new file mode 100644 index 00000000..370fe706 --- /dev/null +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.0.conf @@ -0,0 +1,3 @@ +[global] +daemonize = no +include = /usr/local/etc/php-fpm.d/*.conf diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.1.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.1.conf new file mode 100644 index 00000000..370fe706 --- /dev/null +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.1.conf @@ -0,0 +1,3 @@ +[global] +daemonize = no +include = /usr/local/etc/php-fpm.d/*.conf diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.2.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.2.conf new file mode 100644 index 00000000..370fe706 --- /dev/null +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.2.conf @@ -0,0 +1,3 @@ +[global] +daemonize = no +include = /usr/local/etc/php-fpm.d/*.conf diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.3.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.3.conf new file mode 100644 index 00000000..370fe706 --- /dev/null +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.3.conf @@ -0,0 +1,3 @@ +[global] +daemonize = no +include = /usr/local/etc/php-fpm.d/*.conf diff --git a/Dockerfiles/base/data/php-fpm.d-docker-5.3.conf b/Dockerfiles/base/data/php-fpm.d-docker-5.3.conf deleted file mode 100644 index 3e5b3fc0..00000000 --- a/Dockerfiles/base/data/php-fpm.d-docker-5.3.conf +++ /dev/null @@ -1,10 +0,0 @@ -[www] -; Keep env variables set by docker -;clear_env = no - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -catch_workers_output = yes diff --git a/Dockerfiles/base/data/php-fpm.d/docker.conf b/Dockerfiles/base/data/php-fpm.d/docker.conf deleted file mode 100644 index 2dc750f3..00000000 --- a/Dockerfiles/base/data/php-fpm.d/docker.conf +++ /dev/null @@ -1,10 +0,0 @@ -[www] -; Keep env variables set by docker -clear_env = no - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -catch_workers_output = yes diff --git a/Dockerfiles/base/data/php-fpm.d/listen.conf b/Dockerfiles/base/data/php-fpm.d/listen.conf deleted file mode 100644 index 6972812c..00000000 --- a/Dockerfiles/base/data/php-fpm.d/listen.conf +++ /dev/null @@ -1,3 +0,0 @@ -[www] -; Ensure to listen here -listen = 9000 diff --git a/Dockerfiles/base/data/php-fpm.d/logfiles.conf b/Dockerfiles/base/data/php-fpm.d/logfiles.conf deleted file mode 100644 index 554fd2e1..00000000 --- a/Dockerfiles/base/data/php-fpm.d/logfiles.conf +++ /dev/null @@ -1,6 +0,0 @@ -[global] -error_log = /proc/self/fd/2 - -[www] -; if we send this to /proc/self/fd/1, it never appears -access.log = /proc/self/fd/2 diff --git a/Dockerfiles/base/data/php-fpm.d/loglevel.conf b/Dockerfiles/base/data/php-fpm.d/loglevel.conf deleted file mode 100644 index fa63f954..00000000 --- a/Dockerfiles/base/data/php-fpm.d/loglevel.conf +++ /dev/null @@ -1,2 +0,0 @@ -[global] -log_level = notice diff --git a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.3.conf b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.3.conf new file mode 100644 index 00000000..b99b2de9 --- /dev/null +++ b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.3.conf @@ -0,0 +1,98 @@ +[www] + +; ############################################################ +; Required for Dockerization +; ############################################################ + + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1023 + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 180s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] +; The number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +pm = dynamic + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 10 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 5 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 15 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; PHP settings +; ############################################################ +php_value[error_reporting] = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED +php_flag[xmlrpc_errors] = Off +php_flag[report_memleaks] = On +php_flag[display_errors] = Off +php_flag[display_startup_errors] = Off +php_flag[track_errors] = On +php_flag[log_errors] = On +php_flag[html_errors] = Off diff --git a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.4.conf b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.4.conf new file mode 100644 index 00000000..6ed8472a --- /dev/null +++ b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.4.conf @@ -0,0 +1,100 @@ +[www] + +; ############################################################ +; Required for Dockerization +; ############################################################ + +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1023 + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 180s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] +; The number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +pm = dynamic + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 10 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 5 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 15 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; PHP settings +; ############################################################ +php_value[error_reporting] = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED +php_flag[xmlrpc_errors] = Off +php_flag[report_memleaks] = On +php_flag[display_errors] = Off +php_flag[display_startup_errors] = Off +php_flag[track_errors] = On +php_flag[log_errors] = On +php_flag[html_errors] = Off diff --git a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.5.conf b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.5.conf new file mode 100644 index 00000000..6ed8472a --- /dev/null +++ b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.5.conf @@ -0,0 +1,100 @@ +[www] + +; ############################################################ +; Required for Dockerization +; ############################################################ + +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1023 + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 180s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] +; The number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +pm = dynamic + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 10 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 5 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 15 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; PHP settings +; ############################################################ +php_value[error_reporting] = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED +php_flag[xmlrpc_errors] = Off +php_flag[report_memleaks] = On +php_flag[display_errors] = Off +php_flag[display_startup_errors] = Off +php_flag[track_errors] = On +php_flag[log_errors] = On +php_flag[html_errors] = Off diff --git a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.6.conf b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.6.conf new file mode 100644 index 00000000..6ed8472a --- /dev/null +++ b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.6.conf @@ -0,0 +1,100 @@ +[www] + +; ############################################################ +; Required for Dockerization +; ############################################################ + +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1023 + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 180s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] +; The number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +pm = dynamic + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 10 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 5 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 15 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; PHP settings +; ############################################################ +php_value[error_reporting] = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED +php_flag[xmlrpc_errors] = Off +php_flag[report_memleaks] = On +php_flag[display_errors] = Off +php_flag[display_startup_errors] = Off +php_flag[track_errors] = On +php_flag[log_errors] = On +php_flag[html_errors] = Off diff --git a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.0.conf b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.0.conf new file mode 100644 index 00000000..6ed8472a --- /dev/null +++ b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.0.conf @@ -0,0 +1,100 @@ +[www] + +; ############################################################ +; Required for Dockerization +; ############################################################ + +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1023 + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 180s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] +; The number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +pm = dynamic + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 10 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 5 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 15 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; PHP settings +; ############################################################ +php_value[error_reporting] = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED +php_flag[xmlrpc_errors] = Off +php_flag[report_memleaks] = On +php_flag[display_errors] = Off +php_flag[display_startup_errors] = Off +php_flag[track_errors] = On +php_flag[log_errors] = On +php_flag[html_errors] = Off diff --git a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.1.conf b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.1.conf new file mode 100644 index 00000000..6ed8472a --- /dev/null +++ b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.1.conf @@ -0,0 +1,100 @@ +[www] + +; ############################################################ +; Required for Dockerization +; ############################################################ + +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1023 + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 180s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] +; The number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +pm = dynamic + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 10 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 5 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 15 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; PHP settings +; ############################################################ +php_value[error_reporting] = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED +php_flag[xmlrpc_errors] = Off +php_flag[report_memleaks] = On +php_flag[display_errors] = Off +php_flag[display_startup_errors] = Off +php_flag[track_errors] = On +php_flag[log_errors] = On +php_flag[html_errors] = Off diff --git a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.2.conf b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.2.conf new file mode 100644 index 00000000..ebff2560 --- /dev/null +++ b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.2.conf @@ -0,0 +1,99 @@ +[www] + +; ############################################################ +; Required for Dockerization +; ############################################################ + +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1023 + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 180s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] +; The number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +pm = dynamic + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 10 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 5 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 15 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; PHP settings +; ############################################################ +php_value[error_reporting] = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED +php_flag[xmlrpc_errors] = Off +php_flag[report_memleaks] = On +php_flag[display_errors] = Off +php_flag[display_startup_errors] = Off +php_flag[log_errors] = On +php_flag[html_errors] = Off diff --git a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.3.conf b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.3.conf new file mode 100644 index 00000000..ebff2560 --- /dev/null +++ b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.3.conf @@ -0,0 +1,99 @@ +[www] + +; ############################################################ +; Required for Dockerization +; ############################################################ + +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1023 + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 180s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] +; The number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +pm = dynamic + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 10 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 5 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 15 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; PHP settings +; ############################################################ +php_value[error_reporting] = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED +php_flag[xmlrpc_errors] = Off +php_flag[report_memleaks] = On +php_flag[display_errors] = Off +php_flag[display_startup_errors] = Off +php_flag[log_errors] = On +php_flag[html_errors] = Off diff --git a/Dockerfiles/base/data/php-fpm.d/pool.conf b/Dockerfiles/base/data/php-fpm.d/pool.conf deleted file mode 100644 index 79f9d87f..00000000 --- a/Dockerfiles/base/data/php-fpm.d/pool.conf +++ /dev/null @@ -1,24 +0,0 @@ -[www] - -; The number of child processes is set dynamically based on the following directives: -; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. -pm = dynamic - -; The maximum number of child processes to be created -pm.max_children = 50 - -; The number of child processes created on startup. Used only when pm is set to dynamic. -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. -pm.start_servers = 10 - -; The desired minimum number of idle server processes. -pm.min_spare_servers = 5 - -; The desired maximum number of idle server processes. -pm.max_spare_servers = 15 - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. -; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default value: 0. -pm.max_requests = 500 diff --git a/Dockerfiles/base/data/php-fpm.d/user.conf b/Dockerfiles/base/data/php-fpm.d/user.conf deleted file mode 100644 index bbc2b160..00000000 --- a/Dockerfiles/base/data/php-fpm.d/user.conf +++ /dev/null @@ -1,5 +0,0 @@ -[www] - -; User and Group -user = devilbox -group = devilbox diff --git a/Dockerfiles/base/data/php.d/php-5.3.ini b/Dockerfiles/base/data/php-ini.d/php-5.3.ini similarity index 79% rename from Dockerfiles/base/data/php.d/php-5.3.ini rename to Dockerfiles/base/data/php-ini.d/php-5.3.ini index ed6a2bf4..69784585 100644 --- a/Dockerfiles/base/data/php.d/php-5.3.ini +++ b/Dockerfiles/base/data/php-ini.d/php-5.3.ini @@ -1,11 +1,9 @@ ; ############################################################ -; # Devilbox PHP defaults for all Docker images +; # Devilbox PHP defaults for 5.3-base ; ############################################################ -; This php.ini is applied to the base container and inherited -; by every image built on top of it. -; Note that prod and work images overwrite specific settings -; for their use-case. +; Each PHP flavour (base, mods, prod, work) might have its own php.ini. +; If none is present, the one from the previous flavour is inherited. [PHP] @@ -41,3 +39,4 @@ display_errors = Off display_startup_errors = Off track_errors = On log_errors = On +html_errors = Off diff --git a/Dockerfiles/base/data/php.d/php-5.4.ini b/Dockerfiles/base/data/php-ini.d/php-5.4.ini similarity index 80% rename from Dockerfiles/base/data/php.d/php-5.4.ini rename to Dockerfiles/base/data/php-ini.d/php-5.4.ini index 0d1ed60c..321d0aca 100644 --- a/Dockerfiles/base/data/php.d/php-5.4.ini +++ b/Dockerfiles/base/data/php-ini.d/php-5.4.ini @@ -1,11 +1,9 @@ ; ############################################################ -; # Devilbox PHP defaults for all Docker images +; # Devilbox PHP defaults for 5.4-base ; ############################################################ -; This php.ini is applied to the base container and inherited -; by every image built on top of it. -; Note that prod and work images overwrite specific settings -; for their use-case. +; Each PHP flavour (base, mods, prod, work) might have its own php.ini. +; If none is present, the one from the previous flavour is inherited. [PHP] @@ -42,3 +40,4 @@ display_errors = Off display_startup_errors = Off track_errors = On log_errors = On +html_errors = Off diff --git a/Dockerfiles/base/data/php.d/php-5.5.ini b/Dockerfiles/base/data/php-ini.d/php-5.5.ini similarity index 80% rename from Dockerfiles/base/data/php.d/php-5.5.ini rename to Dockerfiles/base/data/php-ini.d/php-5.5.ini index 0d1ed60c..759543f3 100644 --- a/Dockerfiles/base/data/php.d/php-5.5.ini +++ b/Dockerfiles/base/data/php-ini.d/php-5.5.ini @@ -1,11 +1,9 @@ ; ############################################################ -; # Devilbox PHP defaults for all Docker images +; # Devilbox PHP defaults for 5.5-base ; ############################################################ -; This php.ini is applied to the base container and inherited -; by every image built on top of it. -; Note that prod and work images overwrite specific settings -; for their use-case. +; Each PHP flavour (base, mods, prod, work) might have its own php.ini. +; If none is present, the one from the previous flavour is inherited. [PHP] @@ -42,3 +40,4 @@ display_errors = Off display_startup_errors = Off track_errors = On log_errors = On +html_errors = Off diff --git a/Dockerfiles/base/data/php.d/php-5.6.ini b/Dockerfiles/base/data/php-ini.d/php-5.6.ini similarity index 80% rename from Dockerfiles/base/data/php.d/php-5.6.ini rename to Dockerfiles/base/data/php-ini.d/php-5.6.ini index 0d1ed60c..c9235808 100644 --- a/Dockerfiles/base/data/php.d/php-5.6.ini +++ b/Dockerfiles/base/data/php-ini.d/php-5.6.ini @@ -1,11 +1,9 @@ ; ############################################################ -; # Devilbox PHP defaults for all Docker images +; # Devilbox PHP defaults for 5.6-base ; ############################################################ -; This php.ini is applied to the base container and inherited -; by every image built on top of it. -; Note that prod and work images overwrite specific settings -; for their use-case. +; Each PHP flavour (base, mods, prod, work) might have its own php.ini. +; If none is present, the one from the previous flavour is inherited. [PHP] @@ -42,3 +40,4 @@ display_errors = Off display_startup_errors = Off track_errors = On log_errors = On +html_errors = Off diff --git a/Dockerfiles/base/data/php.d/php-7.0.ini b/Dockerfiles/base/data/php-ini.d/php-7.0.ini similarity index 80% rename from Dockerfiles/base/data/php.d/php-7.0.ini rename to Dockerfiles/base/data/php-ini.d/php-7.0.ini index 0d1ed60c..443affb9 100644 --- a/Dockerfiles/base/data/php.d/php-7.0.ini +++ b/Dockerfiles/base/data/php-ini.d/php-7.0.ini @@ -1,11 +1,9 @@ ; ############################################################ -; # Devilbox PHP defaults for all Docker images +; # Devilbox PHP defaults for 7.0-base ; ############################################################ -; This php.ini is applied to the base container and inherited -; by every image built on top of it. -; Note that prod and work images overwrite specific settings -; for their use-case. +; Each PHP flavour (base, mods, prod, work) might have its own php.ini. +; If none is present, the one from the previous flavour is inherited. [PHP] @@ -42,3 +40,4 @@ display_errors = Off display_startup_errors = Off track_errors = On log_errors = On +html_errors = Off diff --git a/Dockerfiles/base/data/php.d/php-7.1.ini b/Dockerfiles/base/data/php-ini.d/php-7.1.ini similarity index 80% rename from Dockerfiles/base/data/php.d/php-7.1.ini rename to Dockerfiles/base/data/php-ini.d/php-7.1.ini index 0d1ed60c..2e6f49fb 100644 --- a/Dockerfiles/base/data/php.d/php-7.1.ini +++ b/Dockerfiles/base/data/php-ini.d/php-7.1.ini @@ -1,11 +1,9 @@ ; ############################################################ -; # Devilbox PHP defaults for all Docker images +; # Devilbox PHP defaults for 7.1-base ; ############################################################ -; This php.ini is applied to the base container and inherited -; by every image built on top of it. -; Note that prod and work images overwrite specific settings -; for their use-case. +; Each PHP flavour (base, mods, prod, work) might have its own php.ini. +; If none is present, the one from the previous flavour is inherited. [PHP] @@ -42,3 +40,4 @@ display_errors = Off display_startup_errors = Off track_errors = On log_errors = On +html_errors = Off diff --git a/Dockerfiles/base/data/php.d/php-7.2.ini b/Dockerfiles/base/data/php-ini.d/php-7.2.ini similarity index 79% rename from Dockerfiles/base/data/php.d/php-7.2.ini rename to Dockerfiles/base/data/php-ini.d/php-7.2.ini index 6eba34e1..c50b1a22 100644 --- a/Dockerfiles/base/data/php.d/php-7.2.ini +++ b/Dockerfiles/base/data/php-ini.d/php-7.2.ini @@ -1,11 +1,9 @@ ; ############################################################ -; # Devilbox PHP defaults for all Docker images +; # Devilbox PHP defaults for 7.2-base ; ############################################################ -; This php.ini is applied to the base container and inherited -; by every image built on top of it. -; Note that prod and work images overwrite specific settings -; for their use-case. +; Each PHP flavour (base, mods, prod, work) might have its own php.ini. +; If none is present, the one from the previous flavour is inherited. [PHP] @@ -41,3 +39,4 @@ report_memleaks = On display_errors = Off display_startup_errors = Off log_errors = On +html_errors = Off diff --git a/Dockerfiles/base/data/php.d/php-7.3.ini b/Dockerfiles/base/data/php-ini.d/php-7.3.ini similarity index 79% rename from Dockerfiles/base/data/php.d/php-7.3.ini rename to Dockerfiles/base/data/php-ini.d/php-7.3.ini index 6eba34e1..75132c61 100644 --- a/Dockerfiles/base/data/php.d/php-7.3.ini +++ b/Dockerfiles/base/data/php-ini.d/php-7.3.ini @@ -1,11 +1,9 @@ ; ############################################################ -; # Devilbox PHP defaults for all Docker images +; # Devilbox PHP defaults for 7.3-base ; ############################################################ -; This php.ini is applied to the base container and inherited -; by every image built on top of it. -; Note that prod and work images overwrite specific settings -; for their use-case. +; Each PHP flavour (base, mods, prod, work) might have its own php.ini. +; If none is present, the one from the previous flavour is inherited. [PHP] @@ -41,3 +39,4 @@ report_memleaks = On display_errors = Off display_startup_errors = Off log_errors = On +html_errors = Off diff --git a/Dockerfiles/prod/Dockerfile-5.3 b/Dockerfiles/prod/Dockerfile-5.3 index 2daac924..c518baa9 100644 --- a/Dockerfiles/prod/Dockerfile-5.3 +++ b/Dockerfiles/prod/Dockerfile-5.3 @@ -48,7 +48,6 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-5.3.ini /usr/local/etc/php/conf.d/yyy-devilbox-03-prod.ini COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ COPY ./data/postfix.sh /usr/local/sbin/postfix.sh diff --git a/Dockerfiles/prod/Dockerfile-5.4 b/Dockerfiles/prod/Dockerfile-5.4 index e4214c2e..8ae68068 100644 --- a/Dockerfiles/prod/Dockerfile-5.4 +++ b/Dockerfiles/prod/Dockerfile-5.4 @@ -48,7 +48,6 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-5.4.ini /usr/local/etc/php/conf.d/yyy-devilbox-03-prod.ini COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ COPY ./data/postfix.sh /usr/local/sbin/postfix.sh diff --git a/Dockerfiles/prod/Dockerfile-5.5 b/Dockerfiles/prod/Dockerfile-5.5 index d6bee4be..df204b87 100644 --- a/Dockerfiles/prod/Dockerfile-5.5 +++ b/Dockerfiles/prod/Dockerfile-5.5 @@ -48,7 +48,6 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-5.5.ini /usr/local/etc/php/conf.d/yyy-devilbox-03-prod.ini COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ COPY ./data/postfix.sh /usr/local/sbin/postfix.sh diff --git a/Dockerfiles/prod/Dockerfile-5.6 b/Dockerfiles/prod/Dockerfile-5.6 index 4a86296e..c9206724 100644 --- a/Dockerfiles/prod/Dockerfile-5.6 +++ b/Dockerfiles/prod/Dockerfile-5.6 @@ -48,7 +48,6 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-5.6.ini /usr/local/etc/php/conf.d/yyy-devilbox-03-prod.ini COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ COPY ./data/postfix.sh /usr/local/sbin/postfix.sh diff --git a/Dockerfiles/prod/Dockerfile-7.0 b/Dockerfiles/prod/Dockerfile-7.0 index 35e4688f..6d61515b 100644 --- a/Dockerfiles/prod/Dockerfile-7.0 +++ b/Dockerfiles/prod/Dockerfile-7.0 @@ -48,7 +48,6 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-7.0.ini /usr/local/etc/php/conf.d/yyy-devilbox-03-prod.ini COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ COPY ./data/postfix.sh /usr/local/sbin/postfix.sh diff --git a/Dockerfiles/prod/Dockerfile-7.1 b/Dockerfiles/prod/Dockerfile-7.1 index 1e8a5cde..ee4d98bb 100644 --- a/Dockerfiles/prod/Dockerfile-7.1 +++ b/Dockerfiles/prod/Dockerfile-7.1 @@ -48,7 +48,6 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-7.1.ini /usr/local/etc/php/conf.d/yyy-devilbox-03-prod.ini COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ COPY ./data/postfix.sh /usr/local/sbin/postfix.sh diff --git a/Dockerfiles/prod/Dockerfile-7.2 b/Dockerfiles/prod/Dockerfile-7.2 index 3dd8eb5e..bae41cd0 100644 --- a/Dockerfiles/prod/Dockerfile-7.2 +++ b/Dockerfiles/prod/Dockerfile-7.2 @@ -48,7 +48,6 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-7.2.ini /usr/local/etc/php/conf.d/yyy-devilbox-03-prod.ini COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ COPY ./data/postfix.sh /usr/local/sbin/postfix.sh diff --git a/Dockerfiles/prod/Dockerfile-7.3 b/Dockerfiles/prod/Dockerfile-7.3 index 91c62362..7beefbb3 100644 --- a/Dockerfiles/prod/Dockerfile-7.3 +++ b/Dockerfiles/prod/Dockerfile-7.3 @@ -48,7 +48,6 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-7.3.ini /usr/local/etc/php/conf.d/yyy-devilbox-03-prod.ini COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ COPY ./data/postfix.sh /usr/local/sbin/postfix.sh diff --git a/Dockerfiles/prod/data/php.d/php-5.3.ini b/Dockerfiles/prod/data/php.d/php-5.3.ini deleted file mode 100644 index cbbb137d..00000000 --- a/Dockerfiles/prod/data/php.d/php-5.3.ini +++ /dev/null @@ -1,9 +0,0 @@ -; ############################################################ -; # Devilbox PHP defaults for all production Docker images -; ############################################################ - -; This php.ini is applied to the prod container and inherited -; by every image built on top of it. - - -[PHP] diff --git a/Dockerfiles/prod/data/php.d/php-5.4.ini b/Dockerfiles/prod/data/php.d/php-5.4.ini deleted file mode 100644 index cbbb137d..00000000 --- a/Dockerfiles/prod/data/php.d/php-5.4.ini +++ /dev/null @@ -1,9 +0,0 @@ -; ############################################################ -; # Devilbox PHP defaults for all production Docker images -; ############################################################ - -; This php.ini is applied to the prod container and inherited -; by every image built on top of it. - - -[PHP] diff --git a/Dockerfiles/prod/data/php.d/php-5.5.ini b/Dockerfiles/prod/data/php.d/php-5.5.ini deleted file mode 100644 index cbbb137d..00000000 --- a/Dockerfiles/prod/data/php.d/php-5.5.ini +++ /dev/null @@ -1,9 +0,0 @@ -; ############################################################ -; # Devilbox PHP defaults for all production Docker images -; ############################################################ - -; This php.ini is applied to the prod container and inherited -; by every image built on top of it. - - -[PHP] diff --git a/Dockerfiles/prod/data/php.d/php-5.6.ini b/Dockerfiles/prod/data/php.d/php-5.6.ini deleted file mode 100644 index cbbb137d..00000000 --- a/Dockerfiles/prod/data/php.d/php-5.6.ini +++ /dev/null @@ -1,9 +0,0 @@ -; ############################################################ -; # Devilbox PHP defaults for all production Docker images -; ############################################################ - -; This php.ini is applied to the prod container and inherited -; by every image built on top of it. - - -[PHP] diff --git a/Dockerfiles/prod/data/php.d/php-7.0.ini b/Dockerfiles/prod/data/php.d/php-7.0.ini deleted file mode 100644 index cbbb137d..00000000 --- a/Dockerfiles/prod/data/php.d/php-7.0.ini +++ /dev/null @@ -1,9 +0,0 @@ -; ############################################################ -; # Devilbox PHP defaults for all production Docker images -; ############################################################ - -; This php.ini is applied to the prod container and inherited -; by every image built on top of it. - - -[PHP] diff --git a/Dockerfiles/prod/data/php.d/php-7.1.ini b/Dockerfiles/prod/data/php.d/php-7.1.ini deleted file mode 100644 index cbbb137d..00000000 --- a/Dockerfiles/prod/data/php.d/php-7.1.ini +++ /dev/null @@ -1,9 +0,0 @@ -; ############################################################ -; # Devilbox PHP defaults for all production Docker images -; ############################################################ - -; This php.ini is applied to the prod container and inherited -; by every image built on top of it. - - -[PHP] diff --git a/Dockerfiles/prod/data/php.d/php-7.2.ini b/Dockerfiles/prod/data/php.d/php-7.2.ini deleted file mode 100644 index cbbb137d..00000000 --- a/Dockerfiles/prod/data/php.d/php-7.2.ini +++ /dev/null @@ -1,9 +0,0 @@ -; ############################################################ -; # Devilbox PHP defaults for all production Docker images -; ############################################################ - -; This php.ini is applied to the prod container and inherited -; by every image built on top of it. - - -[PHP] diff --git a/Dockerfiles/prod/data/php.d/php-7.3.ini b/Dockerfiles/prod/data/php.d/php-7.3.ini deleted file mode 100644 index cbbb137d..00000000 --- a/Dockerfiles/prod/data/php.d/php-7.3.ini +++ /dev/null @@ -1,9 +0,0 @@ -; ############################################################ -; # Devilbox PHP defaults for all production Docker images -; ############################################################ - -; This php.ini is applied to the prod container and inherited -; by every image built on top of it. - - -[PHP] diff --git a/Dockerfiles/work/Dockerfile-5.3 b/Dockerfiles/work/Dockerfile-5.3 index 56ec5977..210dca5c 100644 --- a/Dockerfiles/work/Dockerfile-5.3 +++ b/Dockerfiles/work/Dockerfile-5.3 @@ -310,13 +310,17 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-5.3.ini /usr/local/etc/php/conf.d/yyy-devilbox-04-work.ini +COPY ./data/php-ini.d/php-5.3.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-fpm.conf/php-fpm-5.3.conf /usr/local/etc/php-fpm.conf +COPY ./data/php-fpm.d/php-fpm.d-5.3.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf + COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ COPY ./data/bash-devilbox /etc/bash-devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox + ### ### Volumes ### diff --git a/Dockerfiles/work/Dockerfile-5.4 b/Dockerfiles/work/Dockerfile-5.4 index 83046b21..b9fdc9b7 100644 --- a/Dockerfiles/work/Dockerfile-5.4 +++ b/Dockerfiles/work/Dockerfile-5.4 @@ -325,13 +325,17 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-5.4.ini /usr/local/etc/php/conf.d/yyy-devilbox-04-work.ini +COPY ./data/php-ini.d/php-5.4.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-fpm.conf/php-fpm-5.4.conf /usr/local/etc/php-fpm.conf +COPY ./data/php-fpm.d/php-fpm.d-5.4.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf + COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ COPY ./data/bash-devilbox /etc/bash-devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox + ### ### Volumes ### diff --git a/Dockerfiles/work/Dockerfile-5.5 b/Dockerfiles/work/Dockerfile-5.5 index 746220f9..2332ec92 100644 --- a/Dockerfiles/work/Dockerfile-5.5 +++ b/Dockerfiles/work/Dockerfile-5.5 @@ -334,13 +334,17 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-5.5.ini /usr/local/etc/php/conf.d/yyy-devilbox-04-work.ini +COPY ./data/php-ini.d/php-5.5.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-fpm.conf/php-fpm-5.5.conf /usr/local/etc/php-fpm.conf +COPY ./data/php-fpm.d/php-fpm.d-5.5.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf + COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ COPY ./data/bash-devilbox /etc/bash-devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox + ### ### Volumes ### diff --git a/Dockerfiles/work/Dockerfile-5.6 b/Dockerfiles/work/Dockerfile-5.6 index 759a1a5b..ba335387 100644 --- a/Dockerfiles/work/Dockerfile-5.6 +++ b/Dockerfiles/work/Dockerfile-5.6 @@ -334,13 +334,17 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-5.6.ini /usr/local/etc/php/conf.d/yyy-devilbox-04-work.ini +COPY ./data/php-ini.d/php-5.6.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-fpm.conf/php-fpm-5.6.conf /usr/local/etc/php-fpm.conf +COPY ./data/php-fpm.d/php-fpm.d-5.6.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf + COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ COPY ./data/bash-devilbox /etc/bash-devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox + ### ### Volumes ### diff --git a/Dockerfiles/work/Dockerfile-7.0 b/Dockerfiles/work/Dockerfile-7.0 index 78c4bd54..88e825b0 100644 --- a/Dockerfiles/work/Dockerfile-7.0 +++ b/Dockerfiles/work/Dockerfile-7.0 @@ -334,13 +334,17 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-7.0.ini /usr/local/etc/php/conf.d/yyy-devilbox-04-work.ini +COPY ./data/php-ini.d/php-7.0.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-fpm.conf/php-fpm-7.0.conf /usr/local/etc/php-fpm.conf +COPY ./data/php-fpm.d/php-fpm.d-7.0.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf + COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ COPY ./data/bash-devilbox /etc/bash-devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox + ### ### Volumes ### diff --git a/Dockerfiles/work/Dockerfile-7.1 b/Dockerfiles/work/Dockerfile-7.1 index 73037310..3914d4be 100644 --- a/Dockerfiles/work/Dockerfile-7.1 +++ b/Dockerfiles/work/Dockerfile-7.1 @@ -334,13 +334,17 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-7.1.ini /usr/local/etc/php/conf.d/yyy-devilbox-04-work.ini +COPY ./data/php-ini.d/php-7.1.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-fpm.conf/php-fpm-7.1.conf /usr/local/etc/php-fpm.conf +COPY ./data/php-fpm.d/php-fpm.d-7.1.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf + COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ COPY ./data/bash-devilbox /etc/bash-devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox + ### ### Volumes ### diff --git a/Dockerfiles/work/Dockerfile-7.2 b/Dockerfiles/work/Dockerfile-7.2 index 0035cf5c..e26e4ba8 100644 --- a/Dockerfiles/work/Dockerfile-7.2 +++ b/Dockerfiles/work/Dockerfile-7.2 @@ -334,13 +334,17 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-7.2.ini /usr/local/etc/php/conf.d/yyy-devilbox-04-work.ini +COPY ./data/php-ini.d/php-7.2.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-fpm.conf/php-fpm-7.2.conf /usr/local/etc/php-fpm.conf +COPY ./data/php-fpm.d/php-fpm.d-7.2.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf + COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ COPY ./data/bash-devilbox /etc/bash-devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox + ### ### Volumes ### diff --git a/Dockerfiles/work/Dockerfile-7.3 b/Dockerfiles/work/Dockerfile-7.3 index e8e3c231..9713a1a4 100644 --- a/Dockerfiles/work/Dockerfile-7.3 +++ b/Dockerfiles/work/Dockerfile-7.3 @@ -322,13 +322,17 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-7.3.ini /usr/local/etc/php/conf.d/yyy-devilbox-04-work.ini +COPY ./data/php-ini.d/php-7.3.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-fpm.conf/php-fpm-7.3.conf /usr/local/etc/php-fpm.conf +COPY ./data/php-fpm.d/php-fpm.d-7.3.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf + COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ COPY ./data/bash-devilbox /etc/bash-devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox + ### ### Volumes ### diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.3.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.3.conf new file mode 100644 index 00000000..370fe706 --- /dev/null +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.3.conf @@ -0,0 +1,3 @@ +[global] +daemonize = no +include = /usr/local/etc/php-fpm.d/*.conf diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.4.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.4.conf new file mode 100644 index 00000000..370fe706 --- /dev/null +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.4.conf @@ -0,0 +1,3 @@ +[global] +daemonize = no +include = /usr/local/etc/php-fpm.d/*.conf diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.5.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.5.conf new file mode 100644 index 00000000..370fe706 --- /dev/null +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.5.conf @@ -0,0 +1,3 @@ +[global] +daemonize = no +include = /usr/local/etc/php-fpm.d/*.conf diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.6.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.6.conf new file mode 100644 index 00000000..370fe706 --- /dev/null +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.6.conf @@ -0,0 +1,3 @@ +[global] +daemonize = no +include = /usr/local/etc/php-fpm.d/*.conf diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.0.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.0.conf new file mode 100644 index 00000000..370fe706 --- /dev/null +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.0.conf @@ -0,0 +1,3 @@ +[global] +daemonize = no +include = /usr/local/etc/php-fpm.d/*.conf diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.1.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.1.conf new file mode 100644 index 00000000..370fe706 --- /dev/null +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.1.conf @@ -0,0 +1,3 @@ +[global] +daemonize = no +include = /usr/local/etc/php-fpm.d/*.conf diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.2.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.2.conf new file mode 100644 index 00000000..370fe706 --- /dev/null +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.2.conf @@ -0,0 +1,3 @@ +[global] +daemonize = no +include = /usr/local/etc/php-fpm.d/*.conf diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.3.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.3.conf new file mode 100644 index 00000000..370fe706 --- /dev/null +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.3.conf @@ -0,0 +1,3 @@ +[global] +daemonize = no +include = /usr/local/etc/php-fpm.d/*.conf diff --git a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.3.conf b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.3.conf new file mode 100644 index 00000000..325c0e42 --- /dev/null +++ b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.3.conf @@ -0,0 +1,98 @@ +[www] + +; ############################################################ +; Required for Dockerization +; ############################################################ + + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1023 + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 180s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] +; The number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +pm = dynamic + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 10 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 5 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 15 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; PHP settings +; ############################################################ +php_value[error_reporting] = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +php_flag[xmlrpc_errors] = Off +php_flag[report_memleaks] = On +php_flag[display_errors] = On +php_flag[display_startup_errors] = On +php_flag[track_errors] = On +php_flag[log_errors] = On +php_flag[html_errors] = On diff --git a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.4.conf b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.4.conf new file mode 100644 index 00000000..9ba572b2 --- /dev/null +++ b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.4.conf @@ -0,0 +1,100 @@ +[www] + +; ############################################################ +; Required for Dockerization +; ############################################################ + +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1023 + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 180s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] +; The number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +pm = dynamic + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 10 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 5 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 15 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; PHP settings +; ############################################################ +php_value[error_reporting] = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +php_flag[xmlrpc_errors] = Off +php_flag[report_memleaks] = On +php_flag[display_errors] = On +php_flag[display_startup_errors] = On +php_flag[track_errors] = On +php_flag[log_errors] = On +php_flag[html_errors] = On diff --git a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.5.conf b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.5.conf new file mode 100644 index 00000000..9ba572b2 --- /dev/null +++ b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.5.conf @@ -0,0 +1,100 @@ +[www] + +; ############################################################ +; Required for Dockerization +; ############################################################ + +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1023 + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 180s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] +; The number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +pm = dynamic + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 10 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 5 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 15 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; PHP settings +; ############################################################ +php_value[error_reporting] = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +php_flag[xmlrpc_errors] = Off +php_flag[report_memleaks] = On +php_flag[display_errors] = On +php_flag[display_startup_errors] = On +php_flag[track_errors] = On +php_flag[log_errors] = On +php_flag[html_errors] = On diff --git a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.6.conf b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.6.conf new file mode 100644 index 00000000..9ba572b2 --- /dev/null +++ b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.6.conf @@ -0,0 +1,100 @@ +[www] + +; ############################################################ +; Required for Dockerization +; ############################################################ + +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1023 + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 180s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] +; The number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +pm = dynamic + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 10 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 5 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 15 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; PHP settings +; ############################################################ +php_value[error_reporting] = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +php_flag[xmlrpc_errors] = Off +php_flag[report_memleaks] = On +php_flag[display_errors] = On +php_flag[display_startup_errors] = On +php_flag[track_errors] = On +php_flag[log_errors] = On +php_flag[html_errors] = On diff --git a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.0.conf b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.0.conf new file mode 100644 index 00000000..9ba572b2 --- /dev/null +++ b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.0.conf @@ -0,0 +1,100 @@ +[www] + +; ############################################################ +; Required for Dockerization +; ############################################################ + +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1023 + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 180s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] +; The number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +pm = dynamic + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 10 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 5 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 15 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; PHP settings +; ############################################################ +php_value[error_reporting] = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +php_flag[xmlrpc_errors] = Off +php_flag[report_memleaks] = On +php_flag[display_errors] = On +php_flag[display_startup_errors] = On +php_flag[track_errors] = On +php_flag[log_errors] = On +php_flag[html_errors] = On diff --git a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.1.conf b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.1.conf new file mode 100644 index 00000000..9ba572b2 --- /dev/null +++ b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.1.conf @@ -0,0 +1,100 @@ +[www] + +; ############################################################ +; Required for Dockerization +; ############################################################ + +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1023 + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 180s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] +; The number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +pm = dynamic + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 10 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 5 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 15 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; PHP settings +; ############################################################ +php_value[error_reporting] = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +php_flag[xmlrpc_errors] = Off +php_flag[report_memleaks] = On +php_flag[display_errors] = On +php_flag[display_startup_errors] = On +php_flag[track_errors] = On +php_flag[log_errors] = On +php_flag[html_errors] = On diff --git a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.2.conf b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.2.conf new file mode 100644 index 00000000..5494b4b7 --- /dev/null +++ b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.2.conf @@ -0,0 +1,99 @@ +[www] + +; ############################################################ +; Required for Dockerization +; ############################################################ + +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1023 + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 180s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] +; The number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +pm = dynamic + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 10 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 5 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 15 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; PHP settings +; ############################################################ +php_value[error_reporting] = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +php_flag[xmlrpc_errors] = Off +php_flag[report_memleaks] = On +php_flag[display_errors] = On +php_flag[display_startup_errors] = On +php_flag[log_errors] = On +php_flag[html_errors] = On diff --git a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.3.conf b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.3.conf new file mode 100644 index 00000000..5494b4b7 --- /dev/null +++ b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.3.conf @@ -0,0 +1,99 @@ +[www] + +; ############################################################ +; Required for Dockerization +; ############################################################ + +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1023 + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 180s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] +; The number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +pm = dynamic + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 10 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 5 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 15 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; PHP settings +; ############################################################ +php_value[error_reporting] = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +php_flag[xmlrpc_errors] = Off +php_flag[report_memleaks] = On +php_flag[display_errors] = On +php_flag[display_startup_errors] = On +php_flag[log_errors] = On +php_flag[html_errors] = On diff --git a/Dockerfiles/work/data/php-ini.d/php-5.3.ini b/Dockerfiles/work/data/php-ini.d/php-5.3.ini new file mode 100644 index 00000000..2683937f --- /dev/null +++ b/Dockerfiles/work/data/php-ini.d/php-5.3.ini @@ -0,0 +1,42 @@ +; ############################################################ +; # Devilbox PHP defaults for 5.3-work +; ############################################################ + +; Each PHP flavour (base, mods, prod, work) might have its own php.ini. +; If none is present, the one from the previous flavour is inherited. + + +[PHP] + +; Memory +; Note: "memory_limit" should be larger than "post_max_size" +memory_limit = 512M + + +; Timeouts +max_execution_time = 180 +max_input_time = 180 + + +; Uploads +; Note: "post_max_size" should be greater than "upload_max_filesize" +post_max_size = 384M +upload_max_filesize = 256M +max_file_uploads = 20 + + +; Vars +variables_order = EGPCS +max_input_nesting_level = 64 + + +; Error reporting +; Note: error_log is dynamic and handled during start to set appropriate setting +error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +xmlrpc_errors = Off +report_memleaks = On +display_errors = On +display_startup_errors = On +track_errors = On +log_errors = On +html_errors = On diff --git a/Dockerfiles/work/data/php-ini.d/php-5.4.ini b/Dockerfiles/work/data/php-ini.d/php-5.4.ini new file mode 100644 index 00000000..23607412 --- /dev/null +++ b/Dockerfiles/work/data/php-ini.d/php-5.4.ini @@ -0,0 +1,43 @@ +; ############################################################ +; # Devilbox PHP defaults for 5.4-work +; ############################################################ + +; Each PHP flavour (base, mods, prod, work) might have its own php.ini. +; If none is present, the one from the previous flavour is inherited. + + +[PHP] + +; Memory +; Note: "memory_limit" should be larger than "post_max_size" +memory_limit = 512M + + +; Timeouts +max_execution_time = 180 +max_input_time = 180 + + +; Uploads +; Note: "post_max_size" should be greater than "upload_max_filesize" +post_max_size = 384M +upload_max_filesize = 256M +max_file_uploads = 20 + + +; Vars +variables_order = EGPCS +max_input_vars = 8000 +max_input_nesting_level = 64 + + +; Error reporting +; Note: error_log is dynamic and handled during start to set appropriate setting +error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +xmlrpc_errors = Off +report_memleaks = On +display_errors = On +display_startup_errors = On +track_errors = On +log_errors = On +html_errors = On diff --git a/Dockerfiles/work/data/php-ini.d/php-5.5.ini b/Dockerfiles/work/data/php-ini.d/php-5.5.ini new file mode 100644 index 00000000..b2d9415e --- /dev/null +++ b/Dockerfiles/work/data/php-ini.d/php-5.5.ini @@ -0,0 +1,43 @@ +; ############################################################ +; # Devilbox PHP defaults for 5.5-work +; ############################################################ + +; Each PHP flavour (base, mods, prod, work) might have its own php.ini. +; If none is present, the one from the previous flavour is inherited. + + +[PHP] + +; Memory +; Note: "memory_limit" should be larger than "post_max_size" +memory_limit = 512M + + +; Timeouts +max_execution_time = 180 +max_input_time = 180 + + +; Uploads +; Note: "post_max_size" should be greater than "upload_max_filesize" +post_max_size = 384M +upload_max_filesize = 256M +max_file_uploads = 20 + + +; Vars +variables_order = EGPCS +max_input_vars = 8000 +max_input_nesting_level = 64 + + +; Error reporting +; Note: error_log is dynamic and handled during start to set appropriate setting +error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +xmlrpc_errors = Off +report_memleaks = On +display_errors = On +display_startup_errors = On +track_errors = On +log_errors = On +html_errors = On diff --git a/Dockerfiles/work/data/php-ini.d/php-5.6.ini b/Dockerfiles/work/data/php-ini.d/php-5.6.ini new file mode 100644 index 00000000..539150df --- /dev/null +++ b/Dockerfiles/work/data/php-ini.d/php-5.6.ini @@ -0,0 +1,43 @@ +; ############################################################ +; # Devilbox PHP defaults for 5.6-work +; ############################################################ + +; Each PHP flavour (base, mods, prod, work) might have its own php.ini. +; If none is present, the one from the previous flavour is inherited. + + +[PHP] + +; Memory +; Note: "memory_limit" should be larger than "post_max_size" +memory_limit = 512M + + +; Timeouts +max_execution_time = 180 +max_input_time = 180 + + +; Uploads +; Note: "post_max_size" should be greater than "upload_max_filesize" +post_max_size = 384M +upload_max_filesize = 256M +max_file_uploads = 20 + + +; Vars +variables_order = EGPCS +max_input_vars = 8000 +max_input_nesting_level = 64 + + +; Error reporting +; Note: error_log is dynamic and handled during start to set appropriate setting +error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +xmlrpc_errors = Off +report_memleaks = On +display_errors = On +display_startup_errors = On +track_errors = On +log_errors = On +html_errors = On diff --git a/Dockerfiles/work/data/php-ini.d/php-7.0.ini b/Dockerfiles/work/data/php-ini.d/php-7.0.ini new file mode 100644 index 00000000..25b3ceba --- /dev/null +++ b/Dockerfiles/work/data/php-ini.d/php-7.0.ini @@ -0,0 +1,43 @@ +; ############################################################ +; # Devilbox PHP defaults for 7.0-work +; ############################################################ + +; Each PHP flavour (base, mods, prod, work) might have its own php.ini. +; If none is present, the one from the previous flavour is inherited. + + +[PHP] + +; Memory +; Note: "memory_limit" should be larger than "post_max_size" +memory_limit = 512M + + +; Timeouts +max_execution_time = 180 +max_input_time = 180 + + +; Uploads +; Note: "post_max_size" should be greater than "upload_max_filesize" +post_max_size = 384M +upload_max_filesize = 256M +max_file_uploads = 20 + + +; Vars +variables_order = EGPCS +max_input_vars = 8000 +max_input_nesting_level = 64 + + +; Error reporting +; Note: error_log is dynamic and handled during start to set appropriate setting +error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +xmlrpc_errors = Off +report_memleaks = On +display_errors = On +display_startup_errors = On +track_errors = On +log_errors = On +html_errors = On diff --git a/Dockerfiles/work/data/php-ini.d/php-7.1.ini b/Dockerfiles/work/data/php-ini.d/php-7.1.ini new file mode 100644 index 00000000..863c37f7 --- /dev/null +++ b/Dockerfiles/work/data/php-ini.d/php-7.1.ini @@ -0,0 +1,43 @@ +; ############################################################ +; # Devilbox PHP defaults for 7.1-work +; ############################################################ + +; Each PHP flavour (base, mods, prod, work) might have its own php.ini. +; If none is present, the one from the previous flavour is inherited. + + +[PHP] + +; Memory +; Note: "memory_limit" should be larger than "post_max_size" +memory_limit = 512M + + +; Timeouts +max_execution_time = 180 +max_input_time = 180 + + +; Uploads +; Note: "post_max_size" should be greater than "upload_max_filesize" +post_max_size = 384M +upload_max_filesize = 256M +max_file_uploads = 20 + + +; Vars +variables_order = EGPCS +max_input_vars = 8000 +max_input_nesting_level = 64 + + +; Error reporting +; Note: error_log is dynamic and handled during start to set appropriate setting +error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +xmlrpc_errors = Off +report_memleaks = On +display_errors = On +display_startup_errors = On +track_errors = On +log_errors = On +html_errors = On diff --git a/Dockerfiles/work/data/php-ini.d/php-7.2.ini b/Dockerfiles/work/data/php-ini.d/php-7.2.ini new file mode 100644 index 00000000..a8b43c87 --- /dev/null +++ b/Dockerfiles/work/data/php-ini.d/php-7.2.ini @@ -0,0 +1,42 @@ +; ############################################################ +; # Devilbox PHP defaults for 7.2-work +; ############################################################ + +; Each PHP flavour (base, mods, prod, work) might have its own php.ini. +; If none is present, the one from the previous flavour is inherited. + + +[PHP] + +; Memory +; Note: "memory_limit" should be larger than "post_max_size" +memory_limit = 512M + + +; Timeouts +max_execution_time = 180 +max_input_time = 180 + + +; Uploads +; Note: "post_max_size" should be greater than "upload_max_filesize" +post_max_size = 384M +upload_max_filesize = 256M +max_file_uploads = 20 + + +; Vars +variables_order = EGPCS +max_input_vars = 8000 +max_input_nesting_level = 64 + + +; Error reporting +; Note: error_log is dynamic and handled during start to set appropriate setting +error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +xmlrpc_errors = Off +report_memleaks = On +display_errors = On +display_startup_errors = On +log_errors = On +html_errors = On diff --git a/Dockerfiles/work/data/php-ini.d/php-7.3.ini b/Dockerfiles/work/data/php-ini.d/php-7.3.ini new file mode 100644 index 00000000..15d063a0 --- /dev/null +++ b/Dockerfiles/work/data/php-ini.d/php-7.3.ini @@ -0,0 +1,42 @@ +; ############################################################ +; # Devilbox PHP defaults for 7.3-work +; ############################################################ + +; Each PHP flavour (base, mods, prod, work) might have its own php.ini. +; If none is present, the one from the previous flavour is inherited. + + +[PHP] + +; Memory +; Note: "memory_limit" should be larger than "post_max_size" +memory_limit = 512M + + +; Timeouts +max_execution_time = 180 +max_input_time = 180 + + +; Uploads +; Note: "post_max_size" should be greater than "upload_max_filesize" +post_max_size = 384M +upload_max_filesize = 256M +max_file_uploads = 20 + + +; Vars +variables_order = EGPCS +max_input_vars = 8000 +max_input_nesting_level = 64 + + +; Error reporting +; Note: error_log is dynamic and handled during start to set appropriate setting +error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +xmlrpc_errors = Off +report_memleaks = On +display_errors = On +display_startup_errors = On +log_errors = On +html_errors = On diff --git a/Dockerfiles/work/data/php.d/php-5.3.ini b/Dockerfiles/work/data/php.d/php-5.3.ini deleted file mode 100644 index ba7061a0..00000000 --- a/Dockerfiles/work/data/php.d/php-5.3.ini +++ /dev/null @@ -1,17 +0,0 @@ -; ############################################################ -; # Devilbox PHP defaults for all development Docker images -; ############################################################ - -; This php.ini is applied to the work container. - - -[PHP] - -; Error reporting -; Note: error_log is dynamic and handled during start to set appropriate setting -error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED -display_errors = On -display_startup_errors = On -track_errors = On -log_errors = On -html_errors = On diff --git a/Dockerfiles/work/data/php.d/php-5.4.ini b/Dockerfiles/work/data/php.d/php-5.4.ini deleted file mode 100644 index ba7061a0..00000000 --- a/Dockerfiles/work/data/php.d/php-5.4.ini +++ /dev/null @@ -1,17 +0,0 @@ -; ############################################################ -; # Devilbox PHP defaults for all development Docker images -; ############################################################ - -; This php.ini is applied to the work container. - - -[PHP] - -; Error reporting -; Note: error_log is dynamic and handled during start to set appropriate setting -error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED -display_errors = On -display_startup_errors = On -track_errors = On -log_errors = On -html_errors = On diff --git a/Dockerfiles/work/data/php.d/php-5.5.ini b/Dockerfiles/work/data/php.d/php-5.5.ini deleted file mode 100644 index ba7061a0..00000000 --- a/Dockerfiles/work/data/php.d/php-5.5.ini +++ /dev/null @@ -1,17 +0,0 @@ -; ############################################################ -; # Devilbox PHP defaults for all development Docker images -; ############################################################ - -; This php.ini is applied to the work container. - - -[PHP] - -; Error reporting -; Note: error_log is dynamic and handled during start to set appropriate setting -error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED -display_errors = On -display_startup_errors = On -track_errors = On -log_errors = On -html_errors = On diff --git a/Dockerfiles/work/data/php.d/php-5.6.ini b/Dockerfiles/work/data/php.d/php-5.6.ini deleted file mode 100644 index ba7061a0..00000000 --- a/Dockerfiles/work/data/php.d/php-5.6.ini +++ /dev/null @@ -1,17 +0,0 @@ -; ############################################################ -; # Devilbox PHP defaults for all development Docker images -; ############################################################ - -; This php.ini is applied to the work container. - - -[PHP] - -; Error reporting -; Note: error_log is dynamic and handled during start to set appropriate setting -error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED -display_errors = On -display_startup_errors = On -track_errors = On -log_errors = On -html_errors = On diff --git a/Dockerfiles/work/data/php.d/php-7.0.ini b/Dockerfiles/work/data/php.d/php-7.0.ini deleted file mode 100644 index ba7061a0..00000000 --- a/Dockerfiles/work/data/php.d/php-7.0.ini +++ /dev/null @@ -1,17 +0,0 @@ -; ############################################################ -; # Devilbox PHP defaults for all development Docker images -; ############################################################ - -; This php.ini is applied to the work container. - - -[PHP] - -; Error reporting -; Note: error_log is dynamic and handled during start to set appropriate setting -error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED -display_errors = On -display_startup_errors = On -track_errors = On -log_errors = On -html_errors = On diff --git a/Dockerfiles/work/data/php.d/php-7.1.ini b/Dockerfiles/work/data/php.d/php-7.1.ini deleted file mode 100644 index ba7061a0..00000000 --- a/Dockerfiles/work/data/php.d/php-7.1.ini +++ /dev/null @@ -1,17 +0,0 @@ -; ############################################################ -; # Devilbox PHP defaults for all development Docker images -; ############################################################ - -; This php.ini is applied to the work container. - - -[PHP] - -; Error reporting -; Note: error_log is dynamic and handled during start to set appropriate setting -error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED -display_errors = On -display_startup_errors = On -track_errors = On -log_errors = On -html_errors = On diff --git a/Dockerfiles/work/data/php.d/php-7.2.ini b/Dockerfiles/work/data/php.d/php-7.2.ini deleted file mode 100644 index a87a0ea9..00000000 --- a/Dockerfiles/work/data/php.d/php-7.2.ini +++ /dev/null @@ -1,16 +0,0 @@ -; ############################################################ -; # Devilbox PHP defaults for all development Docker images -; ############################################################ - -; This php.ini is applied to the work container. - - -[PHP] - -; Error reporting -; Note: error_log is dynamic and handled during start to set appropriate setting -error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED -display_errors = On -display_startup_errors = On -log_errors = On -html_errors = On diff --git a/Dockerfiles/work/data/php.d/php-7.3.ini b/Dockerfiles/work/data/php.d/php-7.3.ini deleted file mode 100644 index a87a0ea9..00000000 --- a/Dockerfiles/work/data/php.d/php-7.3.ini +++ /dev/null @@ -1,16 +0,0 @@ -; ############################################################ -; # Devilbox PHP defaults for all development Docker images -; ############################################################ - -; This php.ini is applied to the work container. - - -[PHP] - -; Error reporting -; Note: error_log is dynamic and handled during start to set appropriate setting -error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED -display_errors = On -display_startup_errors = On -log_errors = On -html_errors = On diff --git a/build/ansible/CONFIGURATION/php-base.ini.j2 b/build/ansible/CONFIGURATION/php-base.ini.j2 deleted file mode 100644 index 96b43b8f..00000000 --- a/build/ansible/CONFIGURATION/php-base.ini.j2 +++ /dev/null @@ -1,48 +0,0 @@ -; ############################################################ -; # Devilbox PHP defaults for all Docker images -; ############################################################ - -; This php.ini is applied to the base container and inherited -; by every image built on top of it. -; Note that prod and work images overwrite specific settings -; for their use-case. - - -[PHP] - -; Memory -; Note: "memory_limit" should be larger than "post_max_size" -memory_limit = 512M - - -; Timeouts -max_execution_time = 180 -max_input_time = 180 - - -; Uploads -; Note: "post_max_size" should be greater than "upload_max_filesize" -post_max_size = 384M -upload_max_filesize = 256M -max_file_uploads = 20 - - -; Vars -variables_order = EGPCS -{% if not (php_version == 5.2 or php_version == 5.3 ) %} -max_input_vars = 8000 -{% endif %} -max_input_nesting_level = 64 - - -; Error reporting -; Note: error_log is dynamic and handled during start to set appropriate setting -error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED -xmlrpc_errors = Off -report_memleaks = On -display_errors = Off -display_startup_errors = Off -{% if php_version == 5.2 or php_version == 5.3 or php_version == 5.4 or php_version == 5.5 or php_version == 5.6 or php_version == 7.0 or php_version == 7.1 %} -track_errors = On -{% endif %} -log_errors = On diff --git a/build/ansible/CONFIGURATION/php-prod.ini.j2 b/build/ansible/CONFIGURATION/php-prod.ini.j2 deleted file mode 100644 index cbbb137d..00000000 --- a/build/ansible/CONFIGURATION/php-prod.ini.j2 +++ /dev/null @@ -1,9 +0,0 @@ -; ############################################################ -; # Devilbox PHP defaults for all production Docker images -; ############################################################ - -; This php.ini is applied to the prod container and inherited -; by every image built on top of it. - - -[PHP] diff --git a/build/ansible/CONFIGURATION/php-work.ini.j2 b/build/ansible/CONFIGURATION/php-work.ini.j2 deleted file mode 100644 index 4aa69047..00000000 --- a/build/ansible/CONFIGURATION/php-work.ini.j2 +++ /dev/null @@ -1,19 +0,0 @@ -; ############################################################ -; # Devilbox PHP defaults for all development Docker images -; ############################################################ - -; This php.ini is applied to the work container. - - -[PHP] - -; Error reporting -; Note: error_log is dynamic and handled during start to set appropriate setting -error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED -display_errors = On -display_startup_errors = On -{% if php_version == 5.2 or php_version == 5.3 or php_version == 5.4 or php_version == 5.5 or php_version == 5.6 or php_version == 7.0 or php_version == 7.1 %} -track_errors = On -{% endif %} -log_errors = On -html_errors = On diff --git a/build/ansible/CONFIGURATIONS/php-fpm.conf.j2 b/build/ansible/CONFIGURATIONS/php-fpm.conf.j2 new file mode 100644 index 00000000..19c3436f --- /dev/null +++ b/build/ansible/CONFIGURATIONS/php-fpm.conf.j2 @@ -0,0 +1,163 @@ +{% if not php_version == 5.2 %} +[global] +daemonize = no +include = /usr/local/etc/php-fpm.d/*.conf +{% else %} +{# PHP-FPM 5.2 uses XML format for configuration #} + + + + All relative paths in this config are relative to php's install prefix + +
+ Pid file + /var/run/php-fpm.pid + + Error log file + {{ item.cfg[item.key].error_log | default(item.cfg[item.alt].error_log) }} + + Log level + {{ item.cfg[item.key].log_level | default(item.cfg[item.alt].log_level) }} + + When this amount of php processes exited with SIGSEGV or SIGBUS ... + 10 + + ... in a less than this interval of time, a graceful restart will be initiated. + Useful to work around accidental curruptions in accelerator's shared memory. + 1m + + Time limit on waiting child's reaction on signals from master + 5s + + Set to 'no' to debug fpm + no +
+ + + +
+ + Name of pool. Used in logs and stats. + default + + Address to accept fastcgi requests on. + Valid syntax is 'ip.ad.re.ss:port' or just 'port' or '/path/to/unix/socket' + 0.0.0.0:{{ item.cfg[item.key].listen | default(item.cfg[item.alt].listen) }} + + + Set listen(2) backlog + {{ item.cfg[item.key].listen_backlog | default(item.cfg[item.alt].listen_backlog) }} + Set permissions for unix socket, if one used. + In Linux read/write permissions must be set in order to allow connections from web server. + Many BSD-derrived systems allow connections regardless of permissions. + + + 0666 + + + Additional php.ini defines, specific to this pool of workers. + + {{ item.cfg[item.key].error_reporting | default(item.cfg[item.alt].error_reporting) }} + {{ item.cfg[item.key].xmlrpc_errors | default(item.cfg[item.alt].xmlrpc_errors) }} + {{ item.cfg[item.key].report_memleaks | default(item.cfg[item.alt].report_memleaks) }} + {{ item.cfg[item.key].display_errors | default(item.cfg[item.alt].display_errors) }} + {{ item.cfg[item.key].display_startup_errors | default(item.cfg[item.alt].display_startup_errors) }} + {{ item.cfg[item.key].track_errors | default(item.cfg[item.alt].track_errors) }} + {{ item.cfg[item.key].log_errors | default(item.cfg[item.alt].log_errors) }} + {{ item.cfg[item.key].html_errors | default(item.cfg[item.alt].html_errors) }} + + + Unix user of processes + {{ item.cfg[item.key].user | default(item.cfg[item.alt].user) }} + + Unix group of processes + {{ item.cfg[item.key].group | default(item.cfg[item.alt].group) }} + + Process manager settings + + + Sets style of controling worker process count. + Valid values are 'static' and 'apache-like' + apache-like + + Sets the limit on the number of simultaneous requests that will be served. + Equivalent to Apache MaxClients directive. + Equivalent to PHP_FCGI_CHILDREN environment in original php.fcgi + Used with any pm_style. + {{ item.cfg[item.key].pm_max_children | default(item.cfg[item.alt].pm_max_children) }} + + Settings group for 'apache-like' pm style + + Sets the number of server processes created on startup. + Used only when 'apache-like' pm_style is selected + {{ item.cfg[item.key].pm_start_servers | default(item.cfg[item.alt].pm_start_servers) }} + + Sets the desired minimum number of idle server processes. + Used only when 'apache-like' pm_style is selected + {{ item.cfg[item.key].pm_min_spare_servers | default(item.cfg[item.alt].pm_min_spare_servers) }} + + Sets the desired maximum number of idle server processes. + Used only when 'apache-like' pm_style is selected + {{ item.cfg[item.key].pm_max_spare_servers | default(item.cfg[item.alt].pm_max_spare_servers) }} + + + + + The timeout (in seconds) for serving a single request after which the worker process will be terminated + Should be used when 'max_execution_time' ini option does not stop script execution for some reason + '0s' means 'off' + {{ item.cfg[item.key].request_terminate_timeout | default(item.cfg[item.alt].request_terminate_timeout) }} + + The timeout (in seconds) for serving of single request after which a php backtrace will be dumped to slow.log file + '0s' means 'off' + 0s + + The log file for slow requests + logs/slow.log + + Set open file desc rlimit + 1024 + + Set max core size rlimit + 0 + + Chroot to this directory at the start, absolute path + + + Chdir to this directory at the start, absolute path + + + Redirect workers' stdout and stderr into main error log. + If not set, they will be redirected to /dev/null, according to FastCGI specs + {{ item.cfg[item.key].catch_workers_output | default(item.cfg[item.alt].catch_workers_output) }} + + How much requests each process should execute before respawn. + Useful to work around memory leaks in 3rd party libraries. + For endless request processing please specify 0 + Equivalent to PHP_FCGI_MAX_REQUESTS + {{ item.cfg[item.key].pm_max_requests | default(item.cfg[item.alt].pm_max_requests) }} + + Comma separated list of ipv4 addresses of FastCGI clients that allowed to connect. + Equivalent to FCGI_WEB_SERVER_ADDRS environment in original php.fcgi (5.2.2+) + Makes sense only with AF_INET listening socket. + + + Pass environment variables like LD_LIBRARY_PATH + All $VARIABLEs are taken from current environment + + $HOSTNAME + /usr/local/bin:/usr/bin:/bin + /tmp + /tmp + /tmp + $OSTYPE + $MACHTYPE + 2 + + +
+ +
+ +
+{% endif %} diff --git a/build/ansible/CONFIGURATIONS/php-fpm.d-conf.j2 b/build/ansible/CONFIGURATIONS/php-fpm.d-conf.j2 new file mode 100644 index 00000000..890196e6 --- /dev/null +++ b/build/ansible/CONFIGURATIONS/php-fpm.d-conf.j2 @@ -0,0 +1,110 @@ +{# PHP-FPM 5.2 uses XML format for configuration and does not allow multiple files #} +{% if not php_version == 5.2 %} +[www] + +; ############################################################ +; Required for Dockerization +; ############################################################ + +{# This value is available since PHP >=5.4 #} +{% if not php_version == 5.3 %} +; Keep env variables set by docker +clear_env = {{ item.cfg[item.key].clear_env | default(item.cfg[item.alt].clear_env) }} +{% endif %} + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = {{ item.cfg[item.key].catch_workers_output | default(item.cfg[item.alt].catch_workers_output) }} + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = {{ item.cfg[item.key].listen | default(item.cfg[item.alt].listen)}} +{# Available since PHP >= 5.4 #} +listen.backlog = {{ item.cfg[item.key].listen_backlog | default(item.cfg[item.alt].listen_backlog) }} + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = {{ item.cfg[item.key].request_terminate_timeout | default(item.cfg[item.alt].request_terminate_timeout) }} + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = {{ item.cfg[item.key].error_log | default(item.cfg[item.alt].error_log) }} +log_level = {{ item.cfg[item.key].log_level | default(item.cfg[item.alt].log_level) }} + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = {{ item.cfg[item.key].access_log | default(item.cfg[item.alt].access_log) }} + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] +; The number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +pm = {{ item.cfg[item.key].pm | default(item.cfg[item.alt].pm) }} + +; The maximum number of child processes to be created +pm.max_children = {{ item.cfg[item.key].pm_max_children | default(item.cfg[item.alt].pm_max_children) }} + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = {{ item.cfg[item.key].pm_start_servers | default(item.cfg[item.alt].pm_start_servers) }} + +; The desired minimum number of idle server processes. +pm.min_spare_servers = {{ item.cfg[item.key].pm_min_spare_servers | default(item.cfg[item.alt].pm_min_spare_servers) }} + +; The desired maximum number of idle server processes. +pm.max_spare_servers = {{ item.cfg[item.key].pm_max_spare_servers | default(item.cfg[item.alt].pm_max_spare_servers) }} + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = {{ item.cfg[item.key].pm_max_requests | default(item.cfg[item.alt].pm_max_requests) }} + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = {{ item.cfg[item.key].user | default(item.cfg[item.alt].user) }} +group = {{ item.cfg[item.key].group | default(item.cfg[item.alt].group) }} + + +; ############################################################ +; PHP settings +; ############################################################ +php_value[error_reporting] = {{ item.cfg[item.key].error_reporting | default(item.cfg[item.alt].error_reporting) }} +php_flag[xmlrpc_errors] = {{ item.cfg[item.key].xmlrpc_errors | default(item.cfg[item.alt].xmlrpc_errors) }} +php_flag[report_memleaks] = {{ item.cfg[item.key].report_memleaks | default(item.cfg[item.alt].report_memleaks) }} +php_flag[display_errors] = {{ item.cfg[item.key].display_errors | default(item.cfg[item.alt].display_errors) }} +php_flag[display_startup_errors] = {{ item.cfg[item.key].display_startup_errors | default(item.cfg[item.alt].display_startup_errors) }} +{# Only available before PHP 7.2 #} +{% if php_version == 5.2 or php_version == 5.3 or php_version == 5.4 or php_version == 5.5 or php_version == 5.6 or php_version == 7.0 or php_version == 7.1 %} +php_flag[track_errors] = {{ item.cfg[item.key].track_errors | default(item.cfg[item.alt].track_errors) }} +{% endif %} +php_flag[log_errors] = {{ item.cfg[item.key].log_errors | default(item.cfg[item.alt].log_errors) }} +php_flag[html_errors] = {{ item.cfg[item.key].html_errors | default(item.cfg[item.alt].html_errors) }} +{% endif %} diff --git a/build/ansible/CONFIGURATIONS/php.ini.j2 b/build/ansible/CONFIGURATIONS/php.ini.j2 new file mode 100644 index 00000000..8fc2a694 --- /dev/null +++ b/build/ansible/CONFIGURATIONS/php.ini.j2 @@ -0,0 +1,49 @@ +; ############################################################ +; # Devilbox PHP defaults for {{ php_version }}-{{ item.key }} +; ############################################################ + +; Each PHP flavour (base, mods, prod, work) might have its own php.ini. +; If none is present, the one from the previous flavour is inherited. + + +[PHP] + +; Memory +; Note: "memory_limit" should be larger than "post_max_size" +memory_limit = {{ item.cfg[item.key].memory_limit | default(item.cfg[item.alt].memory_limit) }} + + +; Timeouts +max_execution_time = {{ item.cfg[item.key].max_execution_time | default(item.cfg[item.alt].max_execution_time) }} +max_input_time = {{ item.cfg[item.key].max_input_time | default(item.cfg[item.alt].max_input_time) }} + + +; Uploads +; Note: "post_max_size" should be greater than "upload_max_filesize" +post_max_size = {{ item.cfg[item.key].post_max_size | default(item.cfg[item.alt].post_max_size) }} +upload_max_filesize = {{ item.cfg[item.key].upload_max_filesize | default(item.cfg[item.alt].upload_max_filesize) }} +max_file_uploads = {{ item.cfg[item.key].max_file_uploads | default(item.cfg[item.alt].max_file_uploads) }} + + +; Vars +variables_order = {{ item.cfg[item.key].variables_order | default(item.cfg[item.alt].variables_order) }} +{# Only available since PHP >=5.4 #} +{% if not (php_version == 5.2 or php_version == 5.3 ) %} +max_input_vars = {{ item.cfg[item.key].max_input_vars | default(item.cfg[item.alt].max_input_vars) }} +{% endif %} +max_input_nesting_level = {{ item.cfg[item.key].max_input_nesting_level | default(item.cfg[item.alt].max_input_nesting_level) }} + + +; Error reporting +; Note: error_log is dynamic and handled during start to set appropriate setting +error_reporting = {{ item.cfg[item.key].error_reporting | default(item.cfg[item.alt].error_reporting) }} +xmlrpc_errors = {{ item.cfg[item.key].xmlrpc_errors | default(item.cfg[item.alt].xmlrpc_errors) }} +report_memleaks = {{ item.cfg[item.key].report_memleaks | default(item.cfg[item.alt].report_memleaks) }} +display_errors = {{ item.cfg[item.key].display_errors | default(item.cfg[item.alt].display_errors) }} +display_startup_errors = {{ item.cfg[item.key].display_startup_errors | default(item.cfg[item.alt].display_startup_errors) }} +{# Only available before PHP 7.2 #} +{% if php_version == 5.2 or php_version == 5.3 or php_version == 5.4 or php_version == 5.5 or php_version == 5.6 or php_version == 7.0 or php_version == 7.1 %} +track_errors = {{ item.cfg[item.key].track_errors | default(item.cfg[item.alt].track_errors) }} +{% endif %} +log_errors = {{ item.cfg[item.key].log_errors | default(item.cfg[item.alt].log_errors) }} +html_errors = {{ item.cfg[item.key].html_errors | default(item.cfg[item.alt].html_errors) }} diff --git a/build/ansible/DOCKERFILES/Dockerfile-base.j2 b/build/ansible/DOCKERFILES/Dockerfile-base.j2 index 606b5da2..77f93eba 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-base.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-base.j2 @@ -1,5 +1,7 @@ # Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead. -{% if php_version == 5.3 %} +{% if php_version == 5.2 %} +FROM devilbox/php-fpm-5.2 +{% elif php_version == 5.3 %} FROM devilbox/php-fpm-5.3 {% elif php_version == 7.3 %} FROM devilbox/php-fpm-7.3 @@ -62,14 +64,12 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-{{ php_version }}.ini /usr/local/etc/php/conf.d/yyy-devilbox-01-base.ini +COPY ./data/php-ini.d/php-{{ php_version }}.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-fpm.conf/php-fpm-{{ php_version }}.conf /usr/local/etc/php-fpm.conf +COPY ./data/php-fpm.d/php-fpm.d-{{ php_version }}.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf + COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d /docker-entrypoint.d -COPY ./data/php-fpm.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d /usr/local/etc/php-fpm.d -{% if php_version == 5.3 %} -COPY ./data/php-fpm.d-docker-5.3.conf /usr/local/etc/php-fpm.d/docker.conf -{% endif %} {% if debug %} diff --git a/build/ansible/DOCKERFILES/Dockerfile-prod.j2 b/build/ansible/DOCKERFILES/Dockerfile-prod.j2 index d3e1e1a4..95bb84a8 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-prod.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-prod.j2 @@ -50,7 +50,6 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-{{ php_version }}.ini /usr/local/etc/php/conf.d/yyy-devilbox-03-prod.ini COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ COPY ./data/postfix.sh /usr/local/sbin/postfix.sh diff --git a/build/ansible/DOCKERFILES/Dockerfile-work.j2 b/build/ansible/DOCKERFILES/Dockerfile-work.j2 index 9c858ef2..2207b351 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-work.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-work.j2 @@ -191,13 +191,17 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php.d/php-{{ php_version }}.ini /usr/local/etc/php/conf.d/yyy-devilbox-04-work.ini +COPY ./data/php-ini.d/php-{{ php_version }}.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-fpm.conf/php-fpm-{{ php_version }}.conf /usr/local/etc/php-fpm.conf +COPY ./data/php-fpm.d/php-fpm.d-{{ php_version }}.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf + COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ COPY ./data/bash-devilbox /etc/bash-devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox + ### ### Volumes ### diff --git a/build/ansible/group_vars/all.yml b/build/ansible/group_vars/all.yml index e7c261ed..1fcad9a4 100644 --- a/build/ansible/group_vars/all.yml +++ b/build/ansible/group_vars/all.yml @@ -1,7 +1,162 @@ --- -# All available Docker flavours (for each version) -template_files: +################################################################################ +# Variables for rendering Dockerfiles and configuration +################################################################################ + + +### +### Available PHP versions +### +php_all_versions: + - 5.2 + - 5.3 + - 5.4 + - 5.5 + - 5.6 + - 7.0 + - 7.1 + - 7.2 + - 7.3 + + +### +### PHP settings equal for php.ini and php-fpm.comf (used below) +### +php_settings_all: + # ---- Settings for PHP.INI and PHP-FPM.CONF ---- + base: + # Timeouts + timeout: 180 + # Error reporting + error_reporting: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED + xmlrpc_errors: 'Off' + report_memleaks: 'On' + display_errors: 'Off' + display_startup_errors: 'Off' + track_errors: 'On' + log_errors: 'On' + html_errors: 'Off' + + work: + # Timeouts + timeout: 180 + # Error reporting + error_reporting: E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED + xmlrpc_errors: 'Off' + report_memleaks: 'On' + display_errors: 'On' + display_startup_errors: 'On' + track_errors: 'On' + log_errors: 'On' + html_errors: 'On' + + +### +### PHP.ini +### +php_settings_ini: + # ---- Sane default ---- + base: + # Memory + memory_limit: 512M + # Timeouts + max_execution_time: "{{ php_settings_all.base.timeout }}" + max_input_time: "{{ php_settings_all.base.timeout }}" + # Uploads + post_max_size: 384M + upload_max_filesize: 256M + max_file_uploads: 20 + # Variables + variables_order: EGPCS + max_input_vars: 8000 + max_input_nesting_level: 64 + # Error reporting + error_reporting: "{{ php_settings_all.base.error_reporting }}" + xmlrpc_errors: "{{ php_settings_all.base.xmlrpc_errors }}" + report_memleaks: "{{ php_settings_all.base.report_memleaks }}" + display_errors: "{{ php_settings_all.base.display_errors }}" + display_startup_errors: "{{ php_settings_all.base.display_startup_errors }}" + track_errors: "{{ php_settings_all.base.track_errors }}" + log_errors: "{{ php_settings_all.base.log_errors }}" + html_errors: "{{ php_settings_all.base.html_errors }}" + # ---- Inherits from base ---- + mods: + # ---- Inherits from base ---- + prod: + # ---- Inherits from base and overwrites certain values ---- + work: + # Error reporting + error_reporting: "{{ php_settings_all.work.error_reporting }}" + xmlrpc_errors: "{{ php_settings_all.work.xmlrpc_errors }}" + report_memleaks: "{{ php_settings_all.work.report_memleaks }}" + display_errors: "{{ php_settings_all.work.display_errors }}" + display_startup_errors: "{{ php_settings_all.work.display_startup_errors }}" + track_errors: "{{ php_settings_all.work.track_errors }}" + log_errors: "{{ php_settings_all.work.log_errors }}" + html_errors: "{{ php_settings_all.work.html_errors }}" + + +### +### PHP-FPM.conf +### +php_settings_fpm: + # ---- Sane default ---- + base: + # Docker + clear_env: 'no' + catch_workers_output: 'yes' + # Timeouts + request_terminate_timeout: "{{ php_settings_all.work.timeout }}s" + # Network + listen: 9000 + listen_backlog: 1023 + # Logging + log_level: notice + error_log: /proc/self/fd/2 + access_log: /proc/self/fd/2 + # Worker + pm: dynamic + pm_max_children: 50 + pm_start_servers: 10 + pm_min_spare_servers: 5 + pm_max_spare_servers: 15 + pm_max_requests: 500 + # User/Group + user: devilbox + group: devilbox + # Error reporting + error_reporting: "{{ php_settings_all.base.error_reporting }}" + xmlrpc_errors: "{{ php_settings_all.base.xmlrpc_errors }}" + report_memleaks: "{{ php_settings_all.base.report_memleaks }}" + display_errors: "{{ php_settings_all.base.display_errors }}" + display_startup_errors: "{{ php_settings_all.base.display_startup_errors }}" + track_errors: "{{ php_settings_all.base.track_errors }}" + log_errors: "{{ php_settings_all.base.log_errors }}" + html_errors: "{{ php_settings_all.base.html_errors }}" + # ---- Inherits from base ---- + mods: + # ---- Inherits from base ---- + prod: + # ---- Inherits from base and overwrites certain values ---- + work: + # Error reporting + error_reporting: "{{ php_settings_all.work.error_reporting }}" + xmlrpc_errors: "{{ php_settings_all.work.xmlrpc_errors }}" + report_memleaks: "{{ php_settings_all.work.report_memleaks }}" + display_errors: "{{ php_settings_all.work.display_errors }}" + display_startup_errors: "{{ php_settings_all.work.display_startup_errors }}" + track_errors: "{{ php_settings_all.work.track_errors }}" + log_errors: "{{ php_settings_all.work.log_errors }}" + html_errors: "{{ php_settings_all.work.html_errors }}" + + +### +### Templates for PHP flavours (base, mods, prod and work) for all PHP versions +### + +# Dockerfiles for base, mods, prod and work +template_dockerfiles: - src: DOCKERFILES/Dockerfile-base.j2 dst: "../../Dockerfiles/base/Dockerfile-{{ php_version }}" - src: DOCKERFILES/Dockerfile-mods.j2 @@ -11,32 +166,58 @@ template_files: - src: DOCKERFILES/Dockerfile-work.j2 dst: "../../Dockerfiles/work/Dockerfile-{{ php_version }}" -# PHP.ini files to apply sane defaults -ini_files: - - src: CONFIGURATION/php-base.ini.j2 - dst: "../../Dockerfiles/base/data/php.d/php-{{ php_version }}.ini" - - src: CONFIGURATION/php-prod.ini.j2 - dst: "../../Dockerfiles/prod/data/php.d/php-{{ php_version }}.ini" - - src: CONFIGURATION/php-work.ini.j2 - dst: "../../Dockerfiles/work/data/php.d/php-{{ php_version }}.ini" +# Configuration files for base, mods, prod and work +template_configurations: + # php.ini + - src: CONFIGURATIONS/php.ini.j2 + dst: "../../Dockerfiles/base/data/php-ini.d/php-{{ php_version }}.ini" + cfg: "{{ php_settings_ini }}" + key: base + alt: base + - src: CONFIGURATIONS/php.ini.j2 + dst: "../../Dockerfiles/work/data/php-ini.d/php-{{ php_version }}.ini" + cfg: "{{ php_settings_ini }}" + key: work + alt: base # Alternative key to use when definition is not set in 'work' + # php-fpm.conf + - src: CONFIGURATIONS/php-fpm.conf.j2 + dst: "../../Dockerfiles/base/data/php-fpm.conf/php-fpm-{{ php_version }}.conf" + cfg: "{{ php_settings_fpm }}" + key: base + alt: base + - src: CONFIGURATIONS/php-fpm.conf.j2 + dst: "../../Dockerfiles/work/data/php-fpm.conf/php-fpm-{{ php_version }}.conf" + cfg: "{{ php_settings_fpm }}" + key: work + alt: base -# Adds self-validating checks to Dockerfile -# turn off for final build -debug: True + # php-fpm.d-conf + - src: CONFIGURATIONS/php-fpm.d-conf.j2 + dst: "../../Dockerfiles/base/data/php-fpm.d/php-fpm.d-{{ php_version }}.conf" + cfg: "{{ php_settings_fpm }}" + key: base + alt: base + - src: CONFIGURATIONS/php-fpm.d-conf.j2 + dst: "../../Dockerfiles/work/data/php-fpm.d/php-fpm.d-{{ php_version }}.conf" + cfg: "{{ php_settings_fpm }}" + key: work + alt: base + # php-fpm.conf (only applied to base and fully inherited) + # + # # php-fpm.d/php-fpm.d.conf (only applied to base and full inherited) + # - src: CONFIGURATIONS/php-fpm.d/php-fpm-base.d.conf.j2 + # dst: "../../Dockerfiles/base/data/php-fpm.d/php-fpm.d-{{ php_version }}.conf" -# All available PHP version -php_all_versions: - - 5.3 - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - 7.1 - - 7.2 - - 7.3 +### +### Variables to be used in this file (group_vars/all.yml) +### + +# Adds self-validating checks to Dockerfile +# turn off for final build +debug: True # Global variables compose_home: /usr/local/src/composer @@ -92,7 +273,6 @@ software_enabled: - cleanup - ### ### All available extra repositories ### diff --git a/build/ansible/roles/template/tasks/main.yml b/build/ansible/roles/template/tasks/main.yml index b4c30359..4cb08791 100644 --- a/build/ansible/roles/template/tasks/main.yml +++ b/build/ansible/roles/template/tasks/main.yml @@ -1,19 +1,19 @@ --- -- name: render template +- name: generate Dockerfiles template: src: "{{ item.src }}" dest: "{{ item.dst }}" force: True mode: 0644 with_items: - - "{{ template_files }}" + - "{{ template_dockerfiles }}" -- name: copy php.ini configuration +- name: generate php configuration files template: src: "{{ item.src }}" dest: "{{ item.dst }}" force: True mode: 0644 with_items: - - "{{ ini_files }}" + - "{{ template_configurations }}" From 694a7c0feacbe20354d1d7f144e84b58e1615039 Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 2 Aug 2018 13:24:41 +0200 Subject: [PATCH 05/24] Refs #30 Adding PHP-FPM 5.2 --- .travis.yml | 1 + Dockerfiles/base/Dockerfile-5.2 | 87 ++++ Dockerfiles/base/Dockerfile-5.3 | 3 +- Dockerfiles/base/Dockerfile-5.4 | 3 +- Dockerfiles/base/Dockerfile-5.5 | 3 +- Dockerfiles/base/Dockerfile-5.6 | 3 +- Dockerfiles/base/Dockerfile-7.0 | 3 +- Dockerfiles/base/Dockerfile-7.1 | 3 +- Dockerfiles/base/Dockerfile-7.2 | 3 +- Dockerfiles/base/Dockerfile-7.3 | 3 +- .../base/data/php-fpm.conf/php-fpm-5.2.conf | 156 +++++++ .../base/data/php-fpm.d/php-fpm.d-5.2.conf | 1 + Dockerfiles/base/data/php-ini.d/php-5.2.ini | 42 ++ Dockerfiles/mods/Dockerfile-5.2 | 388 ++++++++++++++++++ Dockerfiles/prod/Dockerfile-5.2 | 77 ++++ Dockerfiles/work/Dockerfile-5.2 | 328 +++++++++++++++ .../work/data/php-fpm.conf/php-fpm-5.2.conf | 156 +++++++ .../work/data/php-fpm.d/php-fpm.d-5.2.conf | 1 + Dockerfiles/work/data/php-ini.d/php-5.2.ini | 42 ++ Makefile | 52 ++- build/ansible/DOCKERFILES/Dockerfile-base.j2 | 3 +- build/ansible/group_vars/all.yml | 107 ++++- build/ansible/inventory | 1 + build/gen-readme.sh | 7 +- tests/base/04-test-run_nginx.sh | 12 +- tests/prod/06-test-mount-custom_fpm_conf.sh | 80 ++-- 26 files changed, 1491 insertions(+), 74 deletions(-) create mode 100644 Dockerfiles/base/Dockerfile-5.2 create mode 100644 Dockerfiles/base/data/php-fpm.conf/php-fpm-5.2.conf create mode 100644 Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.2.conf create mode 100644 Dockerfiles/base/data/php-ini.d/php-5.2.ini create mode 100644 Dockerfiles/mods/Dockerfile-5.2 create mode 100644 Dockerfiles/prod/Dockerfile-5.2 create mode 100644 Dockerfiles/work/Dockerfile-5.2 create mode 100644 Dockerfiles/work/data/php-fpm.conf/php-fpm-5.2.conf create mode 100644 Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.2.conf create mode 100644 Dockerfiles/work/data/php-ini.d/php-5.2.ini diff --git a/.travis.yml b/.travis.yml index fb2166f3..741e5dad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,7 @@ env: # DOCKER_PASSWORD - secure: "ZRrVOVOkSCS2UxEi1HNF1iKefK4sDT/sPRl1HxMQjLnRRaAMdG0aRnBwQf2YAM2qzhCfN85qt6zZtC4awc2mHiZ88JrAZxBjK6xj4BwOyLbDuzpBsKXnx8Nix+wyYYKSjsC3LOYrsUe+4rvkw3tVvVaX8G2llojwdksF34VDmmHBmzCG/Bsexk7UqC+qw0PZm7BtctQO+IL0btmMDijRDElxfR+AuPvf9JdkhYzw9TOO7Jqd53NssNVGyL+XSV0dfGn8PkZTp1e8D+28pLK4oGVog+Wk7Cq94hSGjk5AkWKvL5441rupG1AA8K3njeDNMKdov4o+dmnkAH7Jh8tjShMhNhoxHce3IzpczjhoE1EyYQcyPf1qdfhV35Xv096iWX5809pp1MZF2oE5eism8JaU9NpGClryVbKVKtup8ko9/tCqz01Czq5Vue40feMkGtdePulg59OhyyPLYldsObw8QlZydkrmgVZe6b+GyybeiHraTfDq4pvTgUrC4Cmm5J3IB5Ig1THEiYKHfRJ5hSSMDDODeBXc8Xh6mFssEVshNx/jbUQWuAVYQFw/GIquVHxr6btbevrWIoD+zmqcc0L98u9pYH8w7b+gMgVJNCC4QQz2NCGGWw9l9/TmLrKJgeXbG18n8D314le1zuna6/VfH9pXIlbNO4hgz5NLHJk=" matrix: + - PHP=5.2 - PHP=5.3 - PHP=5.4 - PHP=5.5 diff --git a/Dockerfiles/base/Dockerfile-5.2 b/Dockerfiles/base/Dockerfile-5.2 new file mode 100644 index 00000000..c8100f97 --- /dev/null +++ b/Dockerfiles/base/Dockerfile-5.2 @@ -0,0 +1,87 @@ +# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead. +FROM devilbox/php-fpm-5.2 +MAINTAINER "cytopia" + + +### +### Labels +### +LABEL \ + name="cytopia's PHP-FPM 5.2 Image" \ + image="devilbox/php-fpm" \ + tag="5.2-base" \ + vendor="devilbox" \ + license="MIT" + + +### +### Envs +### +ENV MY_USER="devilbox" \ + MY_GROUP="devilbox" \ + MY_UID="1000" \ + MY_GID="1000" \ + PHP_VERSION="5.2" + + +### +### User/Group +### +RUN set -x \ + && groupadd -g ${MY_GID} -r ${MY_GROUP} \ + && useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER} + + +### +### Upgrade (install ps) +### +RUN set -x \ + && apt-get update \ + && apt-get upgrade -y \ + && apt-get install --no-install-recommends --no-install-suggests -y procps \ + && rm -rf /var/lib/apt/lists/* + + +### +### Configure +### +RUN set -x \ + && rm -rf /usr/local/etc/php-fpm.d \ + && mkdir -p /usr/local/etc/php-fpm.d \ + && mkdir -p /var/lib/php/session \ + && mkdir -p /var/lib/php/wsdlcache \ + && chown -R devilbox:devilbox /var/lib/php/session \ + && chown -R devilbox:devilbox /var/lib/php/wsdlcache + + +### +### Copy files +### +COPY ./data/php-ini.d/php-5.2.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-fpm.conf/php-fpm-5.2.conf /usr/local/etc/php-fpm.conf +COPY ./data/php-fpm.d/php-fpm.d-5.2.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf + +COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh +COPY ./data/docker-entrypoint.d /docker-entrypoint.d + + +### +### Verify +### +RUN set -x \ + && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.2' \ + && /usr/local/sbin/php-fpm --test \ + && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + + +### +### Ports +### +EXPOSE 9000 + + +### +### Entrypoint +### +ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/base/Dockerfile-5.3 b/Dockerfiles/base/Dockerfile-5.3 index 3099e99c..4fcec30d 100644 --- a/Dockerfiles/base/Dockerfile-5.3 +++ b/Dockerfiles/base/Dockerfile-5.3 @@ -20,7 +20,8 @@ LABEL \ ENV MY_USER="devilbox" \ MY_GROUP="devilbox" \ MY_UID="1000" \ - MY_GID="1000" + MY_GID="1000" \ + PHP_VERSION="5.3" ### diff --git a/Dockerfiles/base/Dockerfile-5.4 b/Dockerfiles/base/Dockerfile-5.4 index 444663b4..10c22cd1 100644 --- a/Dockerfiles/base/Dockerfile-5.4 +++ b/Dockerfiles/base/Dockerfile-5.4 @@ -20,7 +20,8 @@ LABEL \ ENV MY_USER="devilbox" \ MY_GROUP="devilbox" \ MY_UID="1000" \ - MY_GID="1000" + MY_GID="1000" \ + PHP_VERSION="5.4" ### diff --git a/Dockerfiles/base/Dockerfile-5.5 b/Dockerfiles/base/Dockerfile-5.5 index 276c0220..a9adadeb 100644 --- a/Dockerfiles/base/Dockerfile-5.5 +++ b/Dockerfiles/base/Dockerfile-5.5 @@ -20,7 +20,8 @@ LABEL \ ENV MY_USER="devilbox" \ MY_GROUP="devilbox" \ MY_UID="1000" \ - MY_GID="1000" + MY_GID="1000" \ + PHP_VERSION="5.5" ### diff --git a/Dockerfiles/base/Dockerfile-5.6 b/Dockerfiles/base/Dockerfile-5.6 index 5893221f..b15a4e9b 100644 --- a/Dockerfiles/base/Dockerfile-5.6 +++ b/Dockerfiles/base/Dockerfile-5.6 @@ -20,7 +20,8 @@ LABEL \ ENV MY_USER="devilbox" \ MY_GROUP="devilbox" \ MY_UID="1000" \ - MY_GID="1000" + MY_GID="1000" \ + PHP_VERSION="5.6" ### diff --git a/Dockerfiles/base/Dockerfile-7.0 b/Dockerfiles/base/Dockerfile-7.0 index b213de2d..314be179 100644 --- a/Dockerfiles/base/Dockerfile-7.0 +++ b/Dockerfiles/base/Dockerfile-7.0 @@ -20,7 +20,8 @@ LABEL \ ENV MY_USER="devilbox" \ MY_GROUP="devilbox" \ MY_UID="1000" \ - MY_GID="1000" + MY_GID="1000" \ + PHP_VERSION="7.0" ### diff --git a/Dockerfiles/base/Dockerfile-7.1 b/Dockerfiles/base/Dockerfile-7.1 index f4a8bc75..92f9912f 100644 --- a/Dockerfiles/base/Dockerfile-7.1 +++ b/Dockerfiles/base/Dockerfile-7.1 @@ -20,7 +20,8 @@ LABEL \ ENV MY_USER="devilbox" \ MY_GROUP="devilbox" \ MY_UID="1000" \ - MY_GID="1000" + MY_GID="1000" \ + PHP_VERSION="7.1" ### diff --git a/Dockerfiles/base/Dockerfile-7.2 b/Dockerfiles/base/Dockerfile-7.2 index c34d6a51..d8df1b9e 100644 --- a/Dockerfiles/base/Dockerfile-7.2 +++ b/Dockerfiles/base/Dockerfile-7.2 @@ -20,7 +20,8 @@ LABEL \ ENV MY_USER="devilbox" \ MY_GROUP="devilbox" \ MY_UID="1000" \ - MY_GID="1000" + MY_GID="1000" \ + PHP_VERSION="7.2" ### diff --git a/Dockerfiles/base/Dockerfile-7.3 b/Dockerfiles/base/Dockerfile-7.3 index 87cb9e91..361644b3 100644 --- a/Dockerfiles/base/Dockerfile-7.3 +++ b/Dockerfiles/base/Dockerfile-7.3 @@ -20,7 +20,8 @@ LABEL \ ENV MY_USER="devilbox" \ MY_GROUP="devilbox" \ MY_UID="1000" \ - MY_GID="1000" + MY_GID="1000" \ + PHP_VERSION="7.3" ### diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.2.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.2.conf new file mode 100644 index 00000000..ce491243 --- /dev/null +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.2.conf @@ -0,0 +1,156 @@ + + + + All relative paths in this config are relative to php's install prefix + +
+ Pid file + /var/run/php-fpm.pid + + Error log file + /proc/self/fd/2 + + Log level + notice + + When this amount of php processes exited with SIGSEGV or SIGBUS ... + 10 + + ... in a less than this interval of time, a graceful restart will be initiated. + Useful to work around accidental curruptions in accelerator's shared memory. + 1m + + Time limit on waiting child's reaction on signals from master + 5s + + Set to 'no' to debug fpm + no +
+ + + +
+ + Name of pool. Used in logs and stats. + default + + Address to accept fastcgi requests on. + Valid syntax is 'ip.ad.re.ss:port' or just 'port' or '/path/to/unix/socket' + 0.0.0.0:9000 + + + Set listen(2) backlog + 1023 + Set permissions for unix socket, if one used. + In Linux read/write permissions must be set in order to allow connections from web server. + Many BSD-derrived systems allow connections regardless of permissions. + + + 0666 + + + Additional php.ini defines, specific to this pool of workers. + + E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED + Off + On + Off + Off + On + On + Off + + + Unix user of processes + devilbox + + Unix group of processes + devilbox + + Process manager settings + + + Sets style of controling worker process count. + Valid values are 'static' and 'apache-like' + apache-like + + Sets the limit on the number of simultaneous requests that will be served. + Equivalent to Apache MaxClients directive. + Equivalent to PHP_FCGI_CHILDREN environment in original php.fcgi + Used with any pm_style. + 50 + + Settings group for 'apache-like' pm style + + Sets the number of server processes created on startup. + Used only when 'apache-like' pm_style is selected + 10 + + Sets the desired minimum number of idle server processes. + Used only when 'apache-like' pm_style is selected + 5 + + Sets the desired maximum number of idle server processes. + Used only when 'apache-like' pm_style is selected + 15 + + + + + The timeout (in seconds) for serving a single request after which the worker process will be terminated + Should be used when 'max_execution_time' ini option does not stop script execution for some reason + '0s' means 'off' + 180s + + The timeout (in seconds) for serving of single request after which a php backtrace will be dumped to slow.log file + '0s' means 'off' + 0s + + The log file for slow requests + logs/slow.log + + Set open file desc rlimit + 1024 + + Set max core size rlimit + 0 + + Chroot to this directory at the start, absolute path + + + Chdir to this directory at the start, absolute path + + + Redirect workers' stdout and stderr into main error log. + If not set, they will be redirected to /dev/null, according to FastCGI specs + yes + + How much requests each process should execute before respawn. + Useful to work around memory leaks in 3rd party libraries. + For endless request processing please specify 0 + Equivalent to PHP_FCGI_MAX_REQUESTS + 500 + + Comma separated list of ipv4 addresses of FastCGI clients that allowed to connect. + Equivalent to FCGI_WEB_SERVER_ADDRS environment in original php.fcgi (5.2.2+) + Makes sense only with AF_INET listening socket. + + + Pass environment variables like LD_LIBRARY_PATH + All $VARIABLEs are taken from current environment + + $HOSTNAME + /usr/local/bin:/usr/bin:/bin + /tmp + /tmp + /tmp + $OSTYPE + $MACHTYPE + 2 + + +
+ +
+ +
diff --git a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.2.conf b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.2.conf new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.2.conf @@ -0,0 +1 @@ + diff --git a/Dockerfiles/base/data/php-ini.d/php-5.2.ini b/Dockerfiles/base/data/php-ini.d/php-5.2.ini new file mode 100644 index 00000000..87b43beb --- /dev/null +++ b/Dockerfiles/base/data/php-ini.d/php-5.2.ini @@ -0,0 +1,42 @@ +; ############################################################ +; # Devilbox PHP defaults for 5.2-base +; ############################################################ + +; Each PHP flavour (base, mods, prod, work) might have its own php.ini. +; If none is present, the one from the previous flavour is inherited. + + +[PHP] + +; Memory +; Note: "memory_limit" should be larger than "post_max_size" +memory_limit = 512M + + +; Timeouts +max_execution_time = 180 +max_input_time = 180 + + +; Uploads +; Note: "post_max_size" should be greater than "upload_max_filesize" +post_max_size = 384M +upload_max_filesize = 256M +max_file_uploads = 20 + + +; Vars +variables_order = EGPCS +max_input_nesting_level = 64 + + +; Error reporting +; Note: error_log is dynamic and handled during start to set appropriate setting +error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED +xmlrpc_errors = Off +report_memleaks = On +display_errors = Off +display_startup_errors = Off +track_errors = On +log_errors = On +html_errors = Off diff --git a/Dockerfiles/mods/Dockerfile-5.2 b/Dockerfiles/mods/Dockerfile-5.2 new file mode 100644 index 00000000..37b75739 --- /dev/null +++ b/Dockerfiles/mods/Dockerfile-5.2 @@ -0,0 +1,388 @@ +# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead. +FROM devilbox/php-fpm:5.2-base +MAINTAINER "cytopia" + + +### +### Labels +### +LABEL \ + name="cytopia's PHP-FPM 5.2 Image" \ + image="devilbox/php-fpm" \ + tag="5.2-mods" \ + vendor="devilbox" \ + license="MIT" + + +### +### Envs +### +ENV BUILD_DEPS \ + librabbitmq-dev \ + libbz2-dev \ + libcurl4-openssl-dev \ + libxml2-dev \ + libenchant-dev \ + libmagic-dev \ + libssl-dev \ + libpng-dev \ + libjpeg-dev \ + libxpm-dev \ + libvpx-dev \ + zlib1g-dev \ + libfreetype6-dev \ + libc-client-dev \ + libkrb5-dev \ + libcurl4-openssl-dev \ + libfbclient2 \ + libib-util \ + firebird-dev \ + libicu-dev \ + libldap2-dev \ + libsasl2-dev \ + libmcrypt-dev \ + zlib1g-dev \ + zlib1g-dev \ + libmemcached-dev \ + libssl-dev \ + libsasl2-dev \ + freetds-dev \ + libfbclient2 \ + libib-util \ + firebird-dev \ + zlib1g-dev \ + libpq-dev \ + libsqlite3-dev \ + libpq-dev \ + libssl-dev \ + libpspell-dev \ + librecode-dev \ + libmm-dev \ + libxml2-dev \ + libssl-dev \ + libsnmp-dev \ + snmp \ + libxml2-dev \ + libtidy-dev \ + libxml2-dev \ + libxml2-dev \ + libxml2-dev \ + libxml2-dev \ + libxml2-dev \ + libxslt-dev \ + zlib1g-dev \ + ca-certificates \ + git + +ENV RUN_DEPS \ + librabbitmq1 \ + libenchant1c2a \ + libpng12-0 \ + libjpeg62-turbo \ + libxpm4 \ + libvpx1 \ + libfreetype6 \ + libc-client2007e \ + libfbclient2 \ + libicu52 \ + libmcrypt4 \ + libmemcachedutil2 \ + libmysqlclient18 \ + libsybdb5 \ + libfbclient2 \ + libpq5 \ + libpq5 \ + libaspell15 \ + librecode0 \ + snmp \ + libtidy-0.99-0 \ + libxslt1.1 \ + ca-certificates + + +### +### Install +### +RUN set -x \ + && apt-get update \ + && apt-get install --no-install-recommends --no-install-suggests -y \ + ${BUILD_DEPS} \ + \ + \ + && EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \ +&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \ +&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \ +&& tar xvfz ioncube.tar.gz \ +&& cd ioncube \ +&& cp "ioncube_loader_lin_5.2.so" "${EXTENSION_DIR}/ioncube.so" \ +&& cd ../ \ +&& rm -rf ioncube \ +&& rm -rf ioncube.tar.gz \ + \ + && pecl install amqp-1.4.0 \ + && docker-php-ext-enable amqp \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ctype \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) curl \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ + && /usr/local/bin/docker-php-ext-configure dom --with-libxml-dir=/usr \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dom \ + && echo "/usr" | pecl install enchant \ + && docker-php-ext-enable enchant \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ + && pecl install fileinfo \ + && docker-php-ext-enable fileinfo \ + && /usr/local/bin/docker-php-ext-configure ftp --with-openssl-dir \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ftp \ + && ln -s /usr/lib/x86_64-linux-gnu/libjpeg.* /usr/lib/ && \ +ln -s /usr/lib/x86_64-linux-gnu/libpng.* /usr/lib/ && \ +ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ && \ +mkdir /usr/include/freetype2/freetype && \ +ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h \ + \ + && /usr/local/bin/docker-php-ext-configure gd --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) hash \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) iconv \ + && pecl install igbinary \ + && docker-php-ext-enable igbinary \ + && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ + && /usr/local/bin/docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ + && pecl install intl \ + && docker-php-ext-enable intl \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) json \ + && ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \ + && /usr/local/bin/docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mbstring \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ + && pecl install memcache \ + && docker-php-ext-enable memcache \ + && pecl install memcached-2.1.0 \ + && docker-php-ext-enable memcached \ + && yes | pecl install mongo-1.5.8 \ + && docker-php-ext-enable mongo \ + && pecl install msgpack-0.5.7 \ + && docker-php-ext-enable msgpack \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysql \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ + && pecl install zendopcache \ + && docker-php-ext-enable opcache \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo \ + && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ + && /usr/local/bin/docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_sqlite \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \ + && pecl install phar \ + && docker-php-ext-enable phar \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) posix \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \ + && pecl install redis-2.2.7 \ + && docker-php-ext-enable redis \ + && /usr/local/bin/docker-php-ext-configure session --with-mm \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) session \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \ + && /usr/local/bin/docker-php-ext-configure simplexml --with-libxml-dir=/usr \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) simplexml \ + && /usr/local/bin/docker-php-ext-configure snmp --with-openssl-dir \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \ + && /usr/local/bin/docker-php-ext-configure soap --with-libxml-dir=/usr \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tokenizer \ + && pecl install uploadprogress \ + && docker-php-ext-enable uploadprogress \ + && /usr/local/bin/docker-php-ext-configure wddx --with-libxml-dir=/usr \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \ + && pecl install xdebug-2.2.7 \ + && docker-php-ext-enable xdebug \ + && /usr/local/bin/docker-php-ext-configure xml --with-libxml-dir=/usr \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xml \ + && /usr/local/bin/docker-php-ext-configure xmlreader --with-libxml-dir=/usr \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlreader \ + && /usr/local/bin/docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ + && /usr/local/bin/docker-php-ext-configure xmlwriter --with-libxml-dir=/usr \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlwriter \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \ + && /usr/local/bin/docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \ + \ + \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ + ${BUILD_DEPS} \ + \ + \ + && apt-get install --no-install-recommends --no-install-suggests -y \ + ${RUN_DEPS} \ + && rm -rf /var/lib/apt/lists/* \ + && update-ca-certificates \ + && sh -c "find /usr/local -type f -perm /u+x -exec strip --strip-all '{}' + || true" + + +### +### Verify +### +RUN set -x \ + && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.2' \ + && /usr/local/sbin/php-fpm --test \ + && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + +RUN set -x \ + && php -m | grep -oiE '^amqp$' \ + && php-fpm -m | grep -oiE '^amqp$' \ + && php -m | grep -oiE '^bcmath$' \ + && php-fpm -m | grep -oiE '^bcmath$' \ + && php -m | grep -oiE '^bz2$' \ + && php-fpm -m | grep -oiE '^bz2$' \ + && php -m | grep -oiE '^calendar$' \ + && php-fpm -m | grep -oiE '^calendar$' \ + && php -m | grep -oiE '^ctype$' \ + && php-fpm -m | grep -oiE '^ctype$' \ + && php -m | grep -oiE '^curl$' \ + && php-fpm -m | grep -oiE '^curl$' \ + && php -m | grep -oiE '^dba$' \ + && php-fpm -m | grep -oiE '^dba$' \ + && php -m | grep -oiE '^dom$' \ + && php-fpm -m | grep -oiE '^dom$' \ + && php -m | grep -oiE '^enchant$' \ + && php-fpm -m | grep -oiE '^enchant$' \ + && php -m | grep -oiE '^exif$' \ + && php-fpm -m | grep -oiE '^exif$' \ + && php -m | grep -oiE '^fileinfo$' \ + && php-fpm -m | grep -oiE '^fileinfo$' \ + && php -m | grep -oiE '^ftp$' \ + && php-fpm -m | grep -oiE '^ftp$' \ + && php -m | grep -oiE '^gd$' \ + && php-fpm -m | grep -oiE '^gd$' \ + && php -m | grep -oiE '^gettext$' \ + && php-fpm -m | grep -oiE '^gettext$' \ + && php -m | grep -oiE '^hash$' \ + && php-fpm -m | grep -oiE '^hash$' \ + && php -m | grep -oiE '^iconv$' \ + && php-fpm -m | grep -oiE '^iconv$' \ + && php -m | grep -oiE '^igbinary$' \ + && php-fpm -m | grep -oiE '^igbinary$' \ + && php -m | grep -oiE '^imap$' \ + && php-fpm -m | grep -oiE '^imap$' \ + && php -m | grep -oiE '^interbase$' \ + && php-fpm -m | grep -oiE '^interbase$' \ + && php -m | grep -oiE '^intl$' \ + && php-fpm -m | grep -oiE '^intl$' \ + && php -m | grep -oiE '^json$' \ + && php-fpm -m | grep -oiE '^json$' \ + && php -m | grep -oiE '^ldap$' \ + && php-fpm -m | grep -oiE '^ldap$' \ + && php -m | grep -oiE '^mbstring$' \ + && php-fpm -m | grep -oiE '^mbstring$' \ + && php -m | grep -oiE '^mcrypt$' \ + && php-fpm -m | grep -oiE '^mcrypt$' \ + && php -m | grep -oiE '^memcache$' \ + && php-fpm -m | grep -oiE '^memcache$' \ + && php -m | grep -oiE '^memcached$' \ + && php-fpm -m | grep -oiE '^memcached$' \ + && php -m | grep -oiE '^mongo$' \ + && php-fpm -m | grep -oiE '^mongo$' \ + && php -m | grep -oiE '^msgpack$' \ + && php-fpm -m | grep -oiE '^msgpack$' \ + && php -m | grep -oiE '^mysql$' \ + && php-fpm -m | grep -oiE '^mysql$' \ + && php -m | grep -oiE '^mysqli$' \ + && php-fpm -m | grep -oiE '^mysqli$' \ + && php -m | grep -oiE '^Zend Opcache$' \ + && php-fpm -m | grep -oiE '^Zend Opcache$' \ + && php -m | grep -oiE '^pcntl$' \ + && php-fpm -m | grep -oiE '^pcntl$' \ + && php -m | grep -oiE '^pdo$' \ + && php-fpm -m | grep -oiE '^pdo$' \ + && php -m | grep -oiE '^pdo_dblib$' \ + && php-fpm -m | grep -oiE '^pdo_dblib$' \ + && php -m | grep -oiE '^pdo_firebird$' \ + && php-fpm -m | grep -oiE '^pdo_firebird$' \ + && php -m | grep -oiE '^pdo_mysql$' \ + && php-fpm -m | grep -oiE '^pdo_mysql$' \ + && php -m | grep -oiE '^pdo_pgsql$' \ + && php-fpm -m | grep -oiE '^pdo_pgsql$' \ + && php -m | grep -oiE '^pdo_sqlite$' \ + && php-fpm -m | grep -oiE '^pdo_sqlite$' \ + && php -m | grep -oiE '^pgsql$' \ + && php-fpm -m | grep -oiE '^pgsql$' \ + && php -m | grep -oiE '^phar$' \ + && php-fpm -m | grep -oiE '^phar$' \ + && php -m | grep -oiE '^posix$' \ + && php-fpm -m | grep -oiE '^posix$' \ + && php -m | grep -oiE '^pspell$' \ + && php-fpm -m | grep -oiE '^pspell$' \ + && php -m | grep -oiE '^recode$' \ + && php-fpm -m | grep -oiE '^recode$' \ + && php -m | grep -oiE '^redis$' \ + && php-fpm -m | grep -oiE '^redis$' \ + && php -m | grep -oiE '^session$' \ + && php-fpm -m | grep -oiE '^session$' \ + && php -m | grep -oiE '^shmop$' \ + && php-fpm -m | grep -oiE '^shmop$' \ + && php -m | grep -oiE '^simplexml$' \ + && php-fpm -m | grep -oiE '^simplexml$' \ + && php -m | grep -oiE '^snmp$' \ + && php-fpm -m | grep -oiE '^snmp$' \ + && php -m | grep -oiE '^soap$' \ + && php-fpm -m | grep -oiE '^soap$' \ + && php -m | grep -oiE '^sockets$' \ + && php-fpm -m | grep -oiE '^sockets$' \ + && php -m | grep -oiE '^sysvmsg$' \ + && php-fpm -m | grep -oiE '^sysvmsg$' \ + && php -m | grep -oiE '^sysvsem$' \ + && php-fpm -m | grep -oiE '^sysvsem$' \ + && php -m | grep -oiE '^sysvshm$' \ + && php-fpm -m | grep -oiE '^sysvshm$' \ + && php -m | grep -oiE '^tidy$' \ + && php-fpm -m | grep -oiE '^tidy$' \ + && php -m | grep -oiE '^tokenizer$' \ + && php-fpm -m | grep -oiE '^tokenizer$' \ + && php -m | grep -oiE '^uploadprogress$' \ + && php-fpm -m | grep -oiE '^uploadprogress$' \ + && php -m | grep -oiE '^wddx$' \ + && php-fpm -m | grep -oiE '^wddx$' \ + && php -m | grep -oiE '^xdebug$' \ + && php-fpm -m | grep -oiE '^xdebug$' \ + && php -m | grep -oiE '^xml$' \ + && php-fpm -m | grep -oiE '^xml$' \ + && php -m | grep -oiE '^xmlreader$' \ + && php-fpm -m | grep -oiE '^xmlreader$' \ + && php -m | grep -oiE '^xmlrpc$' \ + && php-fpm -m | grep -oiE '^xmlrpc$' \ + && php -m | grep -oiE '^xmlwriter$' \ + && php-fpm -m | grep -oiE '^xmlwriter$' \ + && php -m | grep -oiE '^xsl$' \ + && php-fpm -m | grep -oiE '^xsl$' \ + && php -m | grep -oiE '^zip$' \ + && php-fpm -m | grep -oiE '^zip$' \ + && true + + +### +### Ports +### +EXPOSE 9000 + + +### +### Entrypoint +### +ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/prod/Dockerfile-5.2 b/Dockerfiles/prod/Dockerfile-5.2 new file mode 100644 index 00000000..f10c2e31 --- /dev/null +++ b/Dockerfiles/prod/Dockerfile-5.2 @@ -0,0 +1,77 @@ +# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-prod.j2 instead. +FROM devilbox/php-fpm:5.2-mods +MAINTAINER "cytopia" + + +### +### Labels +### +LABEL \ + name="cytopia's PHP-FPM 5.2 Image" \ + image="devilbox/php-fpm" \ + tag="5.2-prod" \ + vendor="devilbox" \ + license="MIT" + + +### +### Install +### +RUN set -x \ + && apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \ + locales-all \ + postfix \ + postfix-pcre \ + rsyslog \ + socat \ + supervisor \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ + && rm -rf /var/lib/apt/lists/* \ + \ + && rm -rf /etc/supervisor* \ + && mkdir -p /etc/supervisor/conf.d \ + && mkdir -p /var/log/supervisor + + + +### +### Verify +### +RUN set -x \ + && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.2' \ + && /usr/local/sbin/php-fpm --test \ + && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + + +### +### Copy files +### +COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh +COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ +COPY ./data/postfix.sh /usr/local/sbin/postfix.sh +COPY ./data/supervisord.conf /etc/supervisor/supervisord.conf + + +### +### Volumes +### +VOLUME /etc/php-custom.d +VOLUME /etc/php-fpm-custom.d +VOLUME /etc/php-modules.d +VOLUME /var/log/php +VOLUME /var/mail + + + +### +### Ports +### +EXPOSE 9000 + + +### +### Entrypoint +### +ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/work/Dockerfile-5.2 b/Dockerfiles/work/Dockerfile-5.2 new file mode 100644 index 00000000..f20e88e6 --- /dev/null +++ b/Dockerfiles/work/Dockerfile-5.2 @@ -0,0 +1,328 @@ +# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-work.j2 instead. +FROM devilbox/php-fpm:5.2-prod +MAINTAINER "cytopia" + + +### +### Labels +### +LABEL \ + name="cytopia's PHP-FPM 5.2 Image" \ + image="devilbox/php-fpm" \ + tag="5.2-work" \ + vendor="devilbox" \ + license="MIT" + + +### +### Envs +### +ENV BASH_PROFILE=".bashrc" + + +### +### Install Tools +### +RUN set -x \ + && apt-get update \ + && apt-get install --no-install-recommends --no-install-suggests -y \ + dirmngr \ + gnupg \ + && echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \ + && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \ + && echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \ + && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \ + && echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \ + && curl -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add - \ + && echo "deb http://deb.nodesource.com/node_8.x jessie main" > /etc/apt/sources.list.d/node.list \ + && curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | apt-key add - \ + && echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ + && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ + && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \ + && apt-get update \ + && apt-get install --no-install-recommends --no-install-suggests -y \ + ack-grep \ + aspell \ + autoconf \ + automake \ + bash-completion \ + build-essential \ + bzip2 \ + coreutils \ + curl \ + dnsutils \ + dos2unix \ + file \ + gcc \ + git \ + git-flow \ + git-svn \ + hostname \ + htop \ + imagemagick \ + iputils-ping \ + less \ + libc-dev \ + libffi-dev\ + libssl-dev\ + make \ + mongodb-org-shell \ + mongodb-org-tools \ + moreutils \ + mysql-client \ + nano \ + net-tools \ + netcat \ + nodejs \ + openssh-client \ + patch \ + postgresql-client \ + python-cffi \ + python-dev \ + python-pip \ + python-wheel \ + redis-tools \ + rubygems \ + ruby-dev \ + shellcheck \ + silversearcher-ag \ + subversion \ + sudo \ + tig \ + vim \ + w3m \ + wget \ + whois \ + xz-utils \ + yarn \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ + && rm -rf /var/lib/apt/lists/* + + +RUN set -x \ +# ansible + && pip install --upgrade setuptools \ +&& pip install ansible \ + \ +# awesomeci + && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ +&& cd /usr/local/src/awesome-ci \ +&& git checkout $(git describe --abbrev=0 --tags) \ +&& ./configure --prefix=/usr/local \ +&& make install \ +&& cd / \ +&& rm -rf /usr/local/src/awesome-ci \ + \ + && gem install mixlib-config -v 2.2.4 \ +&& gem install mdl \ +&& gem install scss_lint \ +&& npm install -g eslint \ +&& npm install -g jsonlint \ +&& npm install -g mdlint \ +&& npm install -g gulp \ + \ +# gitflow + && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ +&& cd /tmp/gitflow \ +&& make install \ +&& cd / && rm -rf /tmp/gitflow \ + \ +# grunt + && npm install -g grunt grunt-cli \ +# linkcheck + && curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ +&& chmod +x /usr/local/bin/linkcheck \ + \ +# linuxbrew + && git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \ +&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \ +&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \ + 'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \ +&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \ + 'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \ +&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \ + 'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \ +&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew update' \ +&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \ + \ +# mhsendmail + && wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ +&& chmod +x mhsendmail_linux_amd64 \ +&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmai \ + \ +# mysqldumpsecure + && git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \ +&& cd /usr/local/src/mysqldump-secure \ +&& git checkout $(git describe --abbrev=0 --tags) \ +&& cp /usr/local/src/mysqldump-secure/bin/mysqldump-secure /usr/local/bin \ +&& cp /usr/local/src/mysqldump-secure/etc/mysqldump-secure.conf /etc \ +&& cp /usr/local/src/mysqldump-secure/etc/mysqldump-secure.cnf /etc \ +&& touch /var/log/mysqldump-secure.log \ +&& chown ${MY_USER}:${MY_GROUP} /etc/mysqldump-secure.* \ +&& chown ${MY_USER}:${MY_GROUP} /var/log/mysqldump-secure.log \ +&& chmod 0400 /etc/mysqldump-secure.conf \ +&& chmod 0400 /etc/mysqldump-secure.cnf \ +&& chmod 0644 /var/log/mysqldump-secure.log \ +&& sed -i'' 's/^COMPRESS_ARG=.*/COMPRESS_ARG="-9 -c"/g' /etc/mysqldump-secure.conf \ +&& sed -i'' 's/^DUMP_DIR=.*/DUMP_DIR="\/shared\/backups\/mysql"/g' /etc/mysqldump-secure.conf \ +&& sed -i'' 's/^DUMP_DIR_CHMOD=.*/DUMP_DIR_CHMOD="0755"/g' /etc/mysqldump-secure.conf \ +&& sed -i'' 's/^DUMP_FILE_CHMOD=.*/DUMP_FILE_CHMOD="0644"/g' /etc/mysqldump-secure.conf \ +&& sed -i'' 's/^LOG_CHMOD=.*/LOG_CHMOD="0644"/g' /etc/mysqldump-secure.conf \ +&& sed -i'' 's/^NAGIOS_LOG=.*/NAGIOS_LOG=0/g' /etc/mysqldump-secure.conf \ +&& cd / \ +&& rm -rf /usr/local/src/mysqldump-secure \ + \ +# phalcon + && git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ +&& cd /usr/local/src/phalcon-devtools \ +&& git checkout v2.0.7 \ + \ + && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \ +&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \ +&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \ +&& cd / \ +&& rm -rf /usr/local/src/phalcon-devtools/.git \ + \ +# phpcs + && curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ +&& chmod +x /usr/local/bin/phpcs \ + \ +# phpcbf + && curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ +&& chmod +x /usr/local/bin/phpcbf \ + \ +# phpunit + && curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \ +&& chmod +x /usr/local/bin/phpunit \ + \ +# sass + && gem install sass \ +# webpack + && npm install -g webpack webpack-cli \ +# wpcli + && curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ + && chmod +x /usr/local/bin/wp \ +# yamllint + && apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \ + && pip install yamllint \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \ +# cleanup + && rm -rf /home/${MY_USER}/.*json \ +&& rm -rf /home/${MY_USER}/.cache \ +&& rm -rf /home/${MY_USER}/.composer \ +&& rm -rf /home/${MY_USER}/.config \ +&& rm -rf /home/${MY_USER}/.drush \ +&& rm -rf /home/${MY_USER}/.gem \ +&& rm -rf /home/${MY_USER}/.npm \ +&& rm -rf /home/${MY_USER}/.subversion \ +\ +&& rm -rf /root/.*json \ +&& rm -rf /root/.cache \ +&& rm -rf /root/.composer \ +&& rm -rf /root/.config \ +&& rm -rf /root/.drush \ +&& rm -rf /root/.gem \ +&& rm -rf /root/.npm \ +&& rm -rf /root/.subversion \ +\ +&& rm -rf /tmp/* \ + \ + && true + + +### +### Configure Bash +### +RUN \ + { \ + echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:/usr/local/node/bin"; \ + echo "export PATH"; \ + echo ". /etc/bash-devilbox"; \ + echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ + echo " for f in /etc/bashrc-devilbox.d/*.sh ; do"; \ + echo " if [ -r \"\${f}\" ]; then"; \ + echo " . \"\${f}\""; \ + echo " fi"; \ + echo " done"; \ + echo " unset f"; \ + echo "fi"; \ + } | tee -a /home/${MY_USER}/${BASH_PROFILE} /root/${BASH_PROFILE} \ + && chown ${MY_USER}:${MY_GROUP} /home/${MY_USER}/${BASH_PROFILE} + + +### +### Verify +### +RUN set -x \ + && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.2' \ + && /usr/local/sbin/php-fpm --test \ + && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + +RUN set -x \ + && ansible --version | grep -E '^ansible [.0-9]+$' \ + && mdl --version | grep -E '[.0-9]+' \ +&& scss-lint --version | grep -E '[.0-9]+' \ +&& eslint -v | grep -E '[.0-9]+' \ +&& jsonlint --version | grep -E '[.0-9]+' \ +&& mdlint --version | grep -E '[.0-9]+' \ +&& gulp --version | grep -E '[.0-9]+' \ + \ + && git-flow version | grep -E '[.0-9]+' \ + && grunt --version | grep -E '[.0-9]+' \ + && linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \ + && su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \ + && mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \ + && phalcon commands | grep -E '[.0-9]+' \ + && phpcs --version | grep -E 'version [.0-9]+' \ + && phpcbf --version | grep -E 'version [.0-9]+' \ + && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ + && sass --version | grep -E '[.0-9]+' \ + && webpack --version | grep -E '[.0-9]+' \ + && wp --allow-root --version | grep -E '[.0-9]+' \ + && yamllint --version 2>&1 | grep -E '[.0-9]+' \ + && true + + +### +### Copy files +### +COPY ./data/php-ini.d/php-5.2.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-fpm.conf/php-fpm-5.2.conf /usr/local/etc/php-fpm.conf +COPY ./data/php-fpm.d/php-fpm.d-5.2.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf + +COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh +COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ +COPY ./data/bash-devilbox /etc/bash-devilbox +COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox + + + +### +### Volumes +### +VOLUME /etc/bashrc-devilbox.d +VOLUME /etc/php-custom.d +VOLUME /etc/php-fpm-custom.d +VOLUME /etc/php-modules.d +VOLUME /shared/backups +VOLUME /var/log/php +VOLUME /var/mail + + +### +### Ports +### +EXPOSE 9000 + + +### +### Where to start inside the container +### +WORKDIR /shared/httpd + + +### +### Entrypoint +### +ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.2.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.2.conf new file mode 100644 index 00000000..9521473c --- /dev/null +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.2.conf @@ -0,0 +1,156 @@ + + + + All relative paths in this config are relative to php's install prefix + +
+ Pid file + /var/run/php-fpm.pid + + Error log file + /proc/self/fd/2 + + Log level + notice + + When this amount of php processes exited with SIGSEGV or SIGBUS ... + 10 + + ... in a less than this interval of time, a graceful restart will be initiated. + Useful to work around accidental curruptions in accelerator's shared memory. + 1m + + Time limit on waiting child's reaction on signals from master + 5s + + Set to 'no' to debug fpm + no +
+ + + +
+ + Name of pool. Used in logs and stats. + default + + Address to accept fastcgi requests on. + Valid syntax is 'ip.ad.re.ss:port' or just 'port' or '/path/to/unix/socket' + 0.0.0.0:9000 + + + Set listen(2) backlog + 1023 + Set permissions for unix socket, if one used. + In Linux read/write permissions must be set in order to allow connections from web server. + Many BSD-derrived systems allow connections regardless of permissions. + + + 0666 + + + Additional php.ini defines, specific to this pool of workers. + + E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED + Off + On + On + On + On + On + On + + + Unix user of processes + devilbox + + Unix group of processes + devilbox + + Process manager settings + + + Sets style of controling worker process count. + Valid values are 'static' and 'apache-like' + apache-like + + Sets the limit on the number of simultaneous requests that will be served. + Equivalent to Apache MaxClients directive. + Equivalent to PHP_FCGI_CHILDREN environment in original php.fcgi + Used with any pm_style. + 50 + + Settings group for 'apache-like' pm style + + Sets the number of server processes created on startup. + Used only when 'apache-like' pm_style is selected + 10 + + Sets the desired minimum number of idle server processes. + Used only when 'apache-like' pm_style is selected + 5 + + Sets the desired maximum number of idle server processes. + Used only when 'apache-like' pm_style is selected + 15 + + + + + The timeout (in seconds) for serving a single request after which the worker process will be terminated + Should be used when 'max_execution_time' ini option does not stop script execution for some reason + '0s' means 'off' + 180s + + The timeout (in seconds) for serving of single request after which a php backtrace will be dumped to slow.log file + '0s' means 'off' + 0s + + The log file for slow requests + logs/slow.log + + Set open file desc rlimit + 1024 + + Set max core size rlimit + 0 + + Chroot to this directory at the start, absolute path + + + Chdir to this directory at the start, absolute path + + + Redirect workers' stdout and stderr into main error log. + If not set, they will be redirected to /dev/null, according to FastCGI specs + yes + + How much requests each process should execute before respawn. + Useful to work around memory leaks in 3rd party libraries. + For endless request processing please specify 0 + Equivalent to PHP_FCGI_MAX_REQUESTS + 500 + + Comma separated list of ipv4 addresses of FastCGI clients that allowed to connect. + Equivalent to FCGI_WEB_SERVER_ADDRS environment in original php.fcgi (5.2.2+) + Makes sense only with AF_INET listening socket. + + + Pass environment variables like LD_LIBRARY_PATH + All $VARIABLEs are taken from current environment + + $HOSTNAME + /usr/local/bin:/usr/bin:/bin + /tmp + /tmp + /tmp + $OSTYPE + $MACHTYPE + 2 + + +
+ +
+ +
diff --git a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.2.conf b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.2.conf new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.2.conf @@ -0,0 +1 @@ + diff --git a/Dockerfiles/work/data/php-ini.d/php-5.2.ini b/Dockerfiles/work/data/php-ini.d/php-5.2.ini new file mode 100644 index 00000000..08956af0 --- /dev/null +++ b/Dockerfiles/work/data/php-ini.d/php-5.2.ini @@ -0,0 +1,42 @@ +; ############################################################ +; # Devilbox PHP defaults for 5.2-work +; ############################################################ + +; Each PHP flavour (base, mods, prod, work) might have its own php.ini. +; If none is present, the one from the previous flavour is inherited. + + +[PHP] + +; Memory +; Note: "memory_limit" should be larger than "post_max_size" +memory_limit = 512M + + +; Timeouts +max_execution_time = 180 +max_input_time = 180 + + +; Uploads +; Note: "post_max_size" should be greater than "upload_max_filesize" +post_max_size = 384M +upload_max_filesize = 256M +max_file_uploads = 20 + + +; Vars +variables_order = EGPCS +max_input_nesting_level = 64 + + +; Error reporting +; Note: error_log is dynamic and handled during start to set appropriate setting +error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +xmlrpc_errors = Off +report_memleaks = On +display_errors = On +display_startup_errors = On +track_errors = On +log_errors = On +html_errors = On diff --git a/Makefile b/Makefile index 61427b56..e56bd09b 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,7 @@ help: @printf "%s\n" "make rebuild-prod: Rebuild all prod images" @printf "%s\n" "make rebuild-work: Rebuild all work images" @printf "\n" + @printf "%s\n" "make build-base-52: Build PHP 5.2 base image" @printf "%s\n" "make build-base-53: Build PHP 5.3 base image" @printf "%s\n" "make build-base-54: Build PHP 5.4 base image" @printf "%s\n" "make build-base-55: Build PHP 5.5 base image" @@ -36,6 +37,7 @@ help: @printf "%s\n" "make build-base-72: Build PHP 7.2 base image" @printf "%s\n" "make build-base-73: Build PHP 7.3 base image" @printf "\n" + @printf "%s\n" "make build-mods-52: Build PHP 5.2 mods image" @printf "%s\n" "make build-mods-53: Build PHP 5.3 mods image" @printf "%s\n" "make build-mods-54: Build PHP 5.4 mods image" @printf "%s\n" "make build-mods-55: Build PHP 5.5 mods image" @@ -45,6 +47,7 @@ help: @printf "%s\n" "make build-mods-72: Build PHP 7.2 mods image" @printf "%s\n" "make build-mods-73: Build PHP 7.3 mods image" @printf "\n" + @printf "%s\n" "make build-prod-52: Build PHP 5.2 prod image" @printf "%s\n" "make build-prod-53: Build PHP 5.3 prod image" @printf "%s\n" "make build-prod-54: Build PHP 5.4 prod image" @printf "%s\n" "make build-prod-55: Build PHP 5.5 prod image" @@ -54,7 +57,8 @@ help: @printf "%s\n" "make build-prod-72: Build PHP 7.2 prod image" @printf "%s\n" "make build-prod-73: Build PHP 7.3 prod image" @printf "\n" - @printf "%s\n" "make build-work-54: Build PHP 5.3 work image" + @printf "%s\n" "make build-work-52: Build PHP 5.2 work image" + @printf "%s\n" "make build-work-53: Build PHP 5.3 work image" @printf "%s\n" "make build-work-54: Build PHP 5.4 work image" @printf "%s\n" "make build-work-55: Build PHP 5.5 work image" @printf "%s\n" "make build-work-56: Build PHP 5.6 work image" @@ -63,6 +67,7 @@ help: @printf "%s\n" "make build-work-72: Build PHP 7.2 work image" @printf "%s\n" "make build-work-73: Build PHP 7.3 work image" @printf "\n" + @printf "%s\n" "make rebuild-base-52: Build PHP 5.2 base image" @printf "%s\n" "make rebuild-base-53: Build PHP 5.3 base image" @printf "%s\n" "make rebuild-base-54: Build PHP 5.4 base image" @printf "%s\n" "make rebuild-base-55: Build PHP 5.5 base image" @@ -72,6 +77,7 @@ help: @printf "%s\n" "make rebuild-base-72: Build PHP 7.2 base image" @printf "%s\n" "make rebuild-base-73: Build PHP 7.3 base image" @printf "\n" + @printf "%s\n" "make rebuild-mods-52: Build PHP 5.2 mods image" @printf "%s\n" "make rebuild-mods-53: Build PHP 5.3 mods image" @printf "%s\n" "make rebuild-mods-54: Build PHP 5.4 mods image" @printf "%s\n" "make rebuild-mods-55: Build PHP 5.5 mods image" @@ -81,6 +87,7 @@ help: @printf "%s\n" "make rebuild-mods-72: Build PHP 7.2 mods image" @printf "%s\n" "make rebuild-mods-73: Build PHP 7.3 mods image" @printf "\n" + @printf "%s\n" "make rebuild-prod-52: Build PHP 5.2 prod image" @printf "%s\n" "make rebuild-prod-53: Build PHP 5.3 prod image" @printf "%s\n" "make rebuild-prod-54: Build PHP 5.4 prod image" @printf "%s\n" "make rebuild-prod-55: Build PHP 5.5 prod image" @@ -90,6 +97,7 @@ help: @printf "%s\n" "make rebuild-prod-72: Build PHP 7.2 prod image" @printf "%s\n" "make rebuild-prod-73: Build PHP 7.3 prod image" @printf "\n" + @printf "%s\n" "make rebuild-work-52: Build PHP 5.2 work image" @printf "%s\n" "make rebuild-work-53: Build PHP 5.3 work image" @printf "%s\n" "make rebuild-work-54: Build PHP 5.4 work image" @printf "%s\n" "make rebuild-work-55: Build PHP 5.5 work image" @@ -133,21 +141,23 @@ rebuild-all: rebuild-base rebuild-mods rebuild-prod rebuild-work ### ### Build categories ### -build-base: build-base-53 build-base-54 build-base-55 build-base-56 build-base-70 build-base-71 build-base-72 build-base-73 -build-mods: build-mods-53 build-mods-54 build-mods-55 build-mods-56 build-mods-70 build-mods-71 build-mods-72 build-mods-73 -build-prod: build-prod-53 build-prod-54 build-prod-55 build-prod-56 build-prod-70 build-prod-71 build-prod-72 build-prod-73 -build-work: build-work-53 build-work-54 build-work-55 build-work-56 build-work-70 build-work-71 build-work-72 build-work-73 +build-base: build-base-52 build-base-53 build-base-54 build-base-55 build-base-56 build-base-70 build-base-71 build-base-72 build-base-73 +build-mods: build-mods-52 build-mods-53 build-mods-54 build-mods-55 build-mods-56 build-mods-70 build-mods-71 build-mods-72 build-mods-73 +build-prod: build-prod-52 build-prod-53 build-prod-54 build-prod-55 build-prod-56 build-prod-70 build-prod-71 build-prod-72 build-prod-73 +build-work: build-work-52 build-work-53 build-work-54 build-work-55 build-work-56 build-work-70 build-work-71 build-work-72 build-work-73 -rebuild-base: rebuild-base-53 rebuild-base-54 rebuild-base-55 rebuild-base-56 rebuild-base-70 rebuild-base-71 rebuild-base-72 rebuild-base-73 -rebuild-mods: rebuild-mods-53 rebuild-mods-54 rebuild-mods-55 rebuild-mods-56 rebuild-mods-70 rebuild-mods-71 rebuild-mods-72 rebuild-mods-73 -rebuild-prod: rebuild-prod-53 rebuild-prod-54 rebuild-prod-55 rebuild-prod-56 rebuild-prod-70 rebuild-prod-71 rebuild-prod-72 rebuild-prod-73 -rebuild-work: rebuild-work-53 rebuild-work-54 rebuild-work-55 rebuild-work-56 rebuild-work-70 rebuild-work-71 rebuild-work-72 rebuild-work-73 +rebuild-base: rebuild-base-52 rebuild-base-53 rebuild-base-54 rebuild-base-55 rebuild-base-56 rebuild-base-70 rebuild-base-71 rebuild-base-72 rebuild-base-73 +rebuild-mods: rebuild-mods-52 rebuild-mods-53 rebuild-mods-54 rebuild-mods-55 rebuild-mods-56 rebuild-mods-70 rebuild-mods-71 rebuild-mods-72 rebuild-mods-73 +rebuild-prod: rebuild-prod-52 rebuild-prod-53 rebuild-prod-54 rebuild-prod-55 rebuild-prod-56 rebuild-prod-70 rebuild-prod-71 rebuild-prod-72 rebuild-prod-73 +rebuild-work: rebuild-work-52 rebuild-work-53 rebuild-work-54 rebuild-work-55 rebuild-work-56 rebuild-work-70 rebuild-work-71 rebuild-work-72 rebuild-work-73 ### ### Build separately ### +build-base-52: pull-from-52 + docker build -t devilbox/php-fpm:5.2-base -f $(location)/base/Dockerfile-5.2 $(location)/base build-base-53: pull-from-53 docker build -t devilbox/php-fpm:5.3-base -f $(location)/base/Dockerfile-5.3 $(location)/base build-base-54: pull-from-54 @@ -165,6 +175,8 @@ build-base-72: pull-from-72 build-base-73: pull-from-73 docker build -t devilbox/php-fpm:7.3-base -f $(location)/base/Dockerfile-7.3 $(location)/base +build-mods-52: + docker build -t devilbox/php-fpm:5.2-mods -f $(location)/mods/Dockerfile-5.2 $(location)/mods build-mods-53: docker build -t devilbox/php-fpm:5.3-mods -f $(location)/mods/Dockerfile-5.3 $(location)/mods build-mods-54: @@ -182,6 +194,8 @@ build-mods-72: build-mods-73: docker build -t devilbox/php-fpm:7.3-mods -f $(location)/mods/Dockerfile-7.3 $(location)/mods +build-prod-52: + docker build -t devilbox/php-fpm:5.2-prod -f $(location)/prod/Dockerfile-5.2 $(location)/prod build-prod-53: docker build -t devilbox/php-fpm:5.3-prod -f $(location)/prod/Dockerfile-5.3 $(location)/prod build-prod-54: @@ -199,6 +213,8 @@ build-prod-72: build-prod-73: docker build -t devilbox/php-fpm:7.3-prod -f $(location)/prod/Dockerfile-7.3 $(location)/prod +build-work-52: + docker build -t devilbox/php-fpm:5.2-work -f $(location)/work/Dockerfile-5.2 $(location)/work build-work-53: docker build -t devilbox/php-fpm:5.3-work -f $(location)/work/Dockerfile-5.3 $(location)/work build-work-54: @@ -221,6 +237,8 @@ build-work-73: ### ### Rebuild separately ### +rebuild-base-52: pull-from-52 + docker build --no-cache -t devilbox/php-fpm:5.2-base -f $(location)/base/Dockerfile-5.2 $(location)/base rebuild-base-53: pull-from-53 docker build --no-cache -t devilbox/php-fpm:5.3-base -f $(location)/base/Dockerfile-5.3 $(location)/base rebuild-base-54: pull-from-54 @@ -238,6 +256,8 @@ rebuild-base-72: pull-from-72 rebuild-base-73: pull-from-73 docker build --no-cache -t devilbox/php-fpm:7.3-base -f $(location)/base/Dockerfile-7.3 $(location)/base +rebuild-mods-52: + docker build --no-cache -t devilbox/php-fpm:5.2-mods -f $(location)/mods/Dockerfile-5.2 $(location)/mods rebuild-mods-53: docker build --no-cache -t devilbox/php-fpm:5.3-mods -f $(location)/mods/Dockerfile-5.3 $(location)/mods rebuild-mods-54: @@ -255,6 +275,8 @@ rebuild-mods-72: rebuild-mods-73: docker build --no-cache -t devilbox/php-fpm:7.3-mods -f $(location)/mods/Dockerfile-7.3 $(location)/mods +rebuild-prod-52: + docker build --no-cache -t devilbox/php-fpm:5.2-prod -f $(location)/prod/Dockerfile-5.2 $(location)/prod rebuild-prod-53: docker build --no-cache -t devilbox/php-fpm:5.3-prod -f $(location)/prod/Dockerfile-5.3 $(location)/prod rebuild-prod-54: @@ -272,6 +294,8 @@ rebuild-prod-72: rebuild-prod-73: docker build --no-cache -t devilbox/php-fpm:7.3-prod -f $(location)/prod/Dockerfile-7.3 $(location)/prod +rebuild-work-52: + docker build --no-cache -t devilbox/php-fpm:5.2-work -f $(location)/work/Dockerfile-5.2 $(location)/work rebuild-work-53: docker build --no-cache -t devilbox/php-fpm:5.3-work -f $(location)/work/Dockerfile-5.3 $(location)/work rebuild-work-54: @@ -294,6 +318,8 @@ rebuild-work-73: ### ### Pull base FROM images ### +pull-from-52: + docker pull $(shell grep FROM $(location)/base/Dockerfile-5.2 | sed 's/^FROM//g'; done) pull-from-53: docker pull $(shell grep FROM $(location)/base/Dockerfile-5.3 | sed 's/^FROM//g'; done) pull-from-54: @@ -316,6 +342,8 @@ pull-from-73: ### ### Tests ### +test-base-52: + ./tests/test.sh 5.2 base test-base-53: ./tests/test.sh 5.3 base test-base-54: @@ -333,6 +361,8 @@ test-base-72: test-base-73: ./tests/test.sh 7.3 base +test-mods-52: + ./tests/test.sh 5.2 mods test-mods-53: ./tests/test.sh 5.3 mods test-mods-54: @@ -350,6 +380,8 @@ test-mods-72: test-mods-73: ./tests/test.sh 7.3 mods +test-prod-52: + ./tests/test.sh 5.2 prod test-prod-53: ./tests/test.sh 5.3 prod test-prod-54: @@ -367,6 +399,8 @@ test-prod-72: test-prod-73: ./tests/test.sh 7.3 prod +test-work-52: + ./tests/test.sh 5.2 work test-work-53: ./tests/test.sh 5.3 work test-work-54: diff --git a/build/ansible/DOCKERFILES/Dockerfile-base.j2 b/build/ansible/DOCKERFILES/Dockerfile-base.j2 index 77f93eba..58d35d95 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-base.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-base.j2 @@ -28,7 +28,8 @@ LABEL \ ENV MY_USER="devilbox" \ MY_GROUP="devilbox" \ MY_UID="1000" \ - MY_GID="1000" + MY_GID="1000" \ + PHP_VERSION="{{ php_version }}" ### diff --git a/build/ansible/group_vars/all.yml b/build/ansible/group_vars/all.yml index 1fcad9a4..999d1721 100644 --- a/build/ansible/group_vars/all.yml +++ b/build/ansible/group_vars/all.yml @@ -204,12 +204,6 @@ template_configurations: key: work alt: base - # php-fpm.conf (only applied to base and fully inherited) - # - # # php-fpm.d/php-fpm.d.conf (only applied to base and full inherited) - # - src: CONFIGURATIONS/php-fpm.d/php-fpm-base.d.conf.j2 - # dst: "../../Dockerfiles/base/data/php-fpm.d/php-fpm.d-{{ php_version }}.conf" - ### ### Variables to be used in this file (group_vars/all.yml) @@ -370,11 +364,18 @@ software_available: && npm install -g mdlint \ && npm install -g gulp \ composer: + disabled: [5.2] check: composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' all: command: curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer drush: + disabled: [5.2] check: drush --version | grep -E '[.0-9]+' + 5.2: + pre: | + git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \ + && cd /usr/local/src/drush \ + && git checkout 7.4.0 \ 5.3: pre: | git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \ @@ -405,13 +406,14 @@ software_available: && rm -rf /usr/local/src/drush/misc \ && rm -rf /usr/local/src/drush/tests \ codeception: + disabled: [5.2] check: codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' all: command: | COMPOSER_HOME="{{ compose_home }}" composer global require codeception/codeception --dev \ && ln -s {{ compose_home }}/vendor/codeception/codeception/codecept /usr/local/bin/codecept \ drupalconsole: - disabled: [5.3, 5.4] + disabled: [5.2, 5.3, 5.4] check: drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' all: command: curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal @@ -430,7 +432,7 @@ software_available: command: npm install -g grunt grunt-cli laravel: check: laravel --version | grep -E '(Installer|version)\s*[.0-9]+' - disabled: [5.3] + disabled: [5.2, 5.3] 5.4: pre: | git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ @@ -514,6 +516,11 @@ software_available: phalcon: disabled: [7.3] check: phalcon commands | grep -E '[.0-9]+' + 5.2: + pre: | + git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ + && cd /usr/local/src/phalcon-devtools \ + && git checkout v2.0.7 \ 5.3: pre: | git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ @@ -537,6 +544,10 @@ software_available: && rm -rf /usr/local/src/phalcon-devtools/.git \ phpcs: check: phpcs --version | grep -E 'version [.0-9]+' + 5.2: + command: | + curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ + && chmod +x /usr/local/bin/phpcs \ 5.3: command: | curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ @@ -547,6 +558,10 @@ software_available: && chmod +x /usr/local/bin/phpcs \ phpcbf: check: phpcbf --version | grep -E 'version [.0-9]+' + 5.2: + command: | + curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ + && chmod +x /usr/local/bin/phpcbf \ 5.3: command: | curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ @@ -557,6 +572,10 @@ software_available: && chmod +x /usr/local/bin/phpcbf \ phpunit: check: phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' + 5.2: + command: | + curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \ + && chmod +x /usr/local/bin/phpunit \ 5.3: command: | curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \ @@ -582,8 +601,8 @@ software_available: curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ photon: + disabled: [5.2, 5.3, 5.4] check: photon --version | grep -E 'Installer [.0-9]+' - disabled: [5.3, 5.4] all: command: | COMPOSER_HOME="{{ compose_home }}" composer global require "photoncms/installer" \ @@ -593,7 +612,7 @@ software_available: all: command: gem install sass symfony: - disabled: [5.3] + disabled: [5.2, 5.3] check: symfony --version | grep -E 'version\s*[.0-9]+' all: command: curl https://symfony.com/installer -L -o /usr/local/bin/symfony @@ -759,6 +778,10 @@ extensions_enabled: extensions_available: amqp: disabled: [7.3] + 5.2: + run_dep: [librabbitmq1] + type: pecl + version: 1.4.0 5.3: run_dep: [librabbitmq1] 5.4: @@ -771,6 +794,7 @@ extensions_available: build_dep: [librabbitmq-dev] run_dep: [librabbitmq4] apcu: + disabled: [5.2] 5.3: type: pecl version: 4.0.11 @@ -811,6 +835,9 @@ extensions_available: configure: --with-libxml-dir=/usr build_dep: [libxml2-dev] enchant: + 5.2: + type: pecl + command: echo "/usr" | pecl install enchant all: type: builtin build_dep: [libenchant-dev] @@ -819,6 +846,9 @@ extensions_available: all: type: builtin fileinfo: + 5.2: + type: pecl + build_dep: [libmagic-dev] all: type: builtin filter: @@ -829,6 +859,17 @@ extensions_available: configure: --with-openssl-dir build_dep: [libssl-dev] gd: + 5.2: + type: builtin + pre: | + ln -s /usr/lib/x86_64-linux-gnu/libjpeg.* /usr/lib/ && \ + ln -s /usr/lib/x86_64-linux-gnu/libpng.* /usr/lib/ && \ + ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ && \ + mkdir /usr/include/freetype2/freetype && \ + ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h \ + configure: --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf + build_dep: [libpng-dev, libjpeg-dev, libxpm-dev, libvpx-dev, zlib1g-dev, libfreetype6-dev] + run_dep: [libpng12-0, libjpeg62-turbo, libxpm4, libvpx1, libfreetype6] 5.3: type: builtin pre: ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ && mkdir /usr/include/freetype2/freetype && ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h @@ -873,6 +914,7 @@ extensions_available: all: type: builtin gmp: + disabled: [5.2] all: type: builtin pre: ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ @@ -887,6 +929,7 @@ extensions_available: all: type: pecl imagick: + disabled: [5.2] 5.3: type: pecl version: 3.3.0 @@ -914,6 +957,9 @@ extensions_available: build_dep: [libfbclient2, libib-util, firebird-dev] run_dep: [libfbclient2] intl: + 5.2: + type: pecl + run_dep: [libicu52] 5.3: type: builtin run_dep: [libicu52] @@ -988,6 +1034,9 @@ extensions_available: type: pecl build_dep: [zlib1g-dev] memcached: + 5.2: + type: pecl + version: 2.1.0 5.3: type: pecl version: 2.2.0 @@ -1011,11 +1060,15 @@ extensions_available: run_dep: [libmemcachedutil2] mongo: disabled: [7.0, 7.1, 7.2, 7.3] # Deprecated + 5.2: + type: pecl + command: yes | pecl install mongo-1.5.8 all: type: pecl command: yes | pecl install mongo build_dep: [libssl-dev, libsasl2-dev] mongodb: + disabled: [5.2] 5.3: type: pecl version: 0.6.3 @@ -1027,6 +1080,9 @@ extensions_available: build_dep: [libssl-dev, libsasl2-dev] msgpack: disabled: [7.3] + 5.2: + type: pecl + version: 0.5.7 5.3: type: pecl version: 0.5.7 @@ -1059,6 +1115,9 @@ extensions_available: odbc: disabled: "{{ php_all_versions }}" # TODO: sqlext.h' not found! opcache: + 5.2: + type: pecl + command: pecl install zendopcache 5.3: type: pecl command: pecl install zendopcache @@ -1114,7 +1173,12 @@ extensions_available: build_dep: [libpq-dev] run_dep: [libpq5] phalcon: - disabled: [7.3] + disabled: [5.2, 7.3] + 5.2: + type: git + git_url: https://github.com/phalcon/cphalcon + git_ref: phalcon-v2.0.9 + command: cd build && ./install 5.3: type: git git_url: https://github.com/phalcon/cphalcon @@ -1139,6 +1203,8 @@ extensions_available: phar: # https://github.com/docker-library/php/issues/618 disabled: [5.6, 7.0] # TODO: Currently disabled due to bug in built + 5.2: + type: pecl all: type: builtin build_dep: [libssl-dev] @@ -1151,7 +1217,7 @@ extensions_available: build_dep: [libpspell-dev] run_dep: [libaspell15] readline: - disabled: [5.3, 5.4] # Available by default + disabled: [5.2, 5.3, 5.4] # Available by default all: type: builtin build_dep: [libedit-dev, libreadline-dev] @@ -1161,6 +1227,9 @@ extensions_available: build_dep: [librecode-dev] run_dep: [librecode0] redis: + 5.2: + type: pecl + version: 2.2.7 all: type: pecl session: @@ -1191,13 +1260,14 @@ extensions_available: all: type: builtin sodium: - disabled: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1] + disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1] all: type: builtin build_dep: [libsodium-dev] spl: disabled: "{{ php_all_versions }}" # TODO: Did not work swoole: + disabled: [5.2] 5.3: type: pecl version: 1.9.23 @@ -1269,6 +1339,9 @@ extensions_available: all: type: builtin tidy: + 5.2: + type: builtin + run_dep: [libtidy-0.99-0] 5.3: type: builtin run_dep: [libtidy-0.99-0] @@ -1311,6 +1384,9 @@ extensions_available: build_dep: [libxml2-dev] xdebug: disabled: [7.3] + 5.2: + type: pecl + version: 2.2.7 5.3: type: pecl version: 2.2.7 @@ -1352,6 +1428,11 @@ extensions_available: build_dep: [libxslt-dev] run_dep: [libxslt1.1] zip: + 5.2: + type: builtin + configure: --with-zlib-dir=/usr --with-pcre-dir=/usr + build_dep: [zlib1g-dev] + run_dep: [] 5.3: type: builtin configure: --with-zlib-dir=/usr --with-pcre-dir=/usr diff --git a/build/ansible/inventory b/build/ansible/inventory index da44bebb..5fe719c0 100644 --- a/build/ansible/inventory +++ b/build/ansible/inventory @@ -1,4 +1,5 @@ [php] +php-5.2 php_version=5.2 ansible_connection=local php-5.3 php_version=5.3 ansible_connection=local php-5.4 php_version=5.4 ansible_connection=local php-5.5 php_version=5.5 ansible_connection=local diff --git a/build/gen-readme.sh b/build/gen-readme.sh index 4a1ae802..5042d235 100755 --- a/build/gen-readme.sh +++ b/build/gen-readme.sh @@ -14,6 +14,7 @@ CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)" ### print_usage() { echo "Usage: gen-readme.sh" + echo " gen-readme.sh 5.2" echo " gen-readme.sh 5.3" echo " gen-readme.sh 5.4" echo " gen-readme.sh 5.5" @@ -63,6 +64,7 @@ update_readme() { ### if [ "${#}" -eq "0" ]; then # Update PHP modules for all versions at once + update_readme "5.2" update_readme "5.3" update_readme "5.4" update_readme "5.5" @@ -77,8 +79,9 @@ elif [ "${#}" -gt "1" ]; then print_usage exit 1 else - if [ "${1}" != "5.3" ] \ - if [ "${1}" != "5.4" ] \ + if [ "${1}" != "5.2" ] \ + && [ "${1}" != "5.3" ] \ + && [ "${1}" != "5.4" ] \ && [ "${1}" != "5.5" ] \ && [ "${1}" != "5.6" ] \ && [ "${1}" != "7.0" ] \ diff --git a/tests/base/04-test-run_nginx.sh b/tests/base/04-test-run_nginx.sh index cc735394..9a4e66b4 100755 --- a/tests/base/04-test-run_nginx.sh +++ b/tests/base/04-test-run_nginx.sh @@ -71,7 +71,7 @@ run "sleep 10" ### ### Check correct PHP-FPM user ### -if ! docker_exec "${did}" "ps auxw | grep 'php-fpm: pool' | grep -v grep | awk '{ print \$1 }' | head -1 | grep devilbox"; then +if ! docker_exec "${did}" "ps auxw | grep -E '(php-fpm: pool|php-cgi)' | grep -v grep | awk '{ print \$1 }' | tail -1 | grep devilbox"; then docker_exec "${did}" "ps auxw" # Shutdown @@ -82,17 +82,7 @@ if ! docker_exec "${did}" "ps auxw | grep 'php-fpm: pool' | grep -v grep | awk ' echo "Failed" exit 1 fi -if ! docker_exec "${did}" "ps auxw | grep 'php-fpm: pool' | grep -v grep | awk '{ print \$1 }' | tail -1 | grep devilbox"; then - docker_exec "${did}" "ps auxw" - # Shutdown - docker_stop "${ndid}" || true - docker_stop "${did}" || true - rm -rf "${DOC_ROOT_HOST}" - rm -rf "${CONFIG_HOST}" - echo "Failed" - exit 1 -fi ### diff --git a/tests/prod/06-test-mount-custom_fpm_conf.sh b/tests/prod/06-test-mount-custom_fpm_conf.sh index 98a75817..fe1b7723 100755 --- a/tests/prod/06-test-mount-custom_fpm_conf.sh +++ b/tests/prod/06-test-mount-custom_fpm_conf.sh @@ -34,7 +34,24 @@ PHP_CNF_CONT="/etc/php-fpm-custom.d" CONTAINER="nginx:stable" -printf "[www]\nphp_admin_value[memory_limit] = 17M\n" > "${PHP_CNF_HOST}/post.conf" +if [ "${VERSION}" = "5.2" ]; then + { + echo ''; + echo ''; + echo ' '; + echo '
'; + echo ' '; + echo ' 17M'; + echo ' 17M'; + echo ' 17M'; + echo ' '; + echo '
'; + echo '
'; + echo '
'; + } > "${PHP_CNF_HOST}/post.conf" +else + printf "[www]\nphp_admin_value[memory_limit] = 17M\n" > "${PHP_CNF_HOST}/post.conf" +fi echo " "${DOC_ROOT_HOST}/index.php" # Fix mount permissions @@ -122,35 +139,38 @@ fi # Check modified php-fpm.conf -if ! run "curl -q -4 http://127.0.0.1:${WWW_PORT}/index.php 2>/dev/null | grep memory_limit | grep '17M'"; then - # Info - run "netstat -tuln" - run "curl -4 http://127.0.0.1:${WWW_PORT}/index.php | grep memory_limit" || true - run "docker ps --no-trunc" - docker_exec "${ndid}" "nginx -t" - - # Show logs - docker_logs "${ndid}" || true - docker_logs "${did}" || true - - # Ensure file is available - docker_exec "${ndid}" "ls -la ${DOC_ROOT_CONT}/" - docker_exec "${did}" "ls -la ${DOC_ROOT_CONT}/" - - docker_exec "${ndid}" "cat ${DOC_ROOT_CONT}/index.php" - docker_exec "${did}" "cat ${DOC_ROOT_CONT}/index.php" - - # Nginx configuration - docker_exec "${ndid}" "cat ${CONFIG_CONT}/php.conf" - - # Shutdown - docker_stop "${ndid}" || true - docker_stop "${did}" || true - rm -rf "${DOC_ROOT_HOST}" - rm -rf "${CONFIG_HOST}" - rm -rf "${PHP_CNF_HOST}" - echo "Failed" - exit 1 +# Does not work with PHP 5.2 +if [ "${VERSION}" != "5.2" ]; then + if ! run "curl -q -4 http://127.0.0.1:${WWW_PORT}/index.php 2>/dev/null | grep memory_limit | grep '17M'"; then + # Info + run "netstat -tuln" + run "curl -4 http://127.0.0.1:${WWW_PORT}/index.php | grep memory_limit" || true + run "docker ps --no-trunc" + docker_exec "${ndid}" "nginx -t" + + # Show logs + docker_logs "${ndid}" || true + docker_logs "${did}" || true + + # Ensure file is available + docker_exec "${ndid}" "ls -la ${DOC_ROOT_CONT}/" + docker_exec "${did}" "ls -la ${DOC_ROOT_CONT}/" + + docker_exec "${ndid}" "cat ${DOC_ROOT_CONT}/index.php" + docker_exec "${did}" "cat ${DOC_ROOT_CONT}/index.php" + + # Nginx configuration + docker_exec "${ndid}" "cat ${CONFIG_CONT}/php.conf" + + # Shutdown + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${DOC_ROOT_HOST}" + rm -rf "${CONFIG_HOST}" + rm -rf "${PHP_CNF_HOST}" + echo "Failed" + exit 1 + fi fi From 6ad00ccb3fe3aef76cd9c64bbfd2b8f32212fba9 Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 2 Aug 2018 13:44:35 +0200 Subject: [PATCH 06/24] Refs #30 apply git stash from previous PHP 5.2 setup --- Dockerfiles/base/Dockerfile-5.3 | 3 +- Dockerfiles/base/Dockerfile-5.4 | 3 +- Dockerfiles/base/Dockerfile-5.5 | 3 +- Dockerfiles/base/Dockerfile-5.6 | 3 +- Dockerfiles/base/Dockerfile-7.0 | 3 +- Dockerfiles/base/Dockerfile-7.1 | 3 +- Dockerfiles/base/Dockerfile-7.2 | 3 +- Dockerfiles/base/Dockerfile-7.3 | 3 +- Makefile | 50 ++++++++-- build/ansible/DOCKERFILES/Dockerfile-base.j2 | 11 ++- build/ansible/group_vars/all.yml | 98 ++++++++++++++++++-- build/ansible/inventory | 1 + build/gen-readme.sh | 7 +- tests/base/04-test-run_nginx.sh | 12 +-- tests/prod/06-test-mount-custom_fpm_conf.sh | 80 ++++++++++------ 15 files changed, 215 insertions(+), 68 deletions(-) diff --git a/Dockerfiles/base/Dockerfile-5.3 b/Dockerfiles/base/Dockerfile-5.3 index e45ea960..7d4204cb 100644 --- a/Dockerfiles/base/Dockerfile-5.3 +++ b/Dockerfiles/base/Dockerfile-5.3 @@ -20,7 +20,8 @@ LABEL \ ENV MY_USER="devilbox" \ MY_GROUP="devilbox" \ MY_UID="1000" \ - MY_GID="1000" + MY_GID="1000" \ + PHP_VERSION="5.3" ### diff --git a/Dockerfiles/base/Dockerfile-5.4 b/Dockerfiles/base/Dockerfile-5.4 index aabf29fe..564dffe2 100644 --- a/Dockerfiles/base/Dockerfile-5.4 +++ b/Dockerfiles/base/Dockerfile-5.4 @@ -20,7 +20,8 @@ LABEL \ ENV MY_USER="devilbox" \ MY_GROUP="devilbox" \ MY_UID="1000" \ - MY_GID="1000" + MY_GID="1000" \ + PHP_VERSION="5.4" ### diff --git a/Dockerfiles/base/Dockerfile-5.5 b/Dockerfiles/base/Dockerfile-5.5 index a1bc3537..056c24c6 100644 --- a/Dockerfiles/base/Dockerfile-5.5 +++ b/Dockerfiles/base/Dockerfile-5.5 @@ -20,7 +20,8 @@ LABEL \ ENV MY_USER="devilbox" \ MY_GROUP="devilbox" \ MY_UID="1000" \ - MY_GID="1000" + MY_GID="1000" \ + PHP_VERSION="5.5" ### diff --git a/Dockerfiles/base/Dockerfile-5.6 b/Dockerfiles/base/Dockerfile-5.6 index 9f257f31..8b86cf44 100644 --- a/Dockerfiles/base/Dockerfile-5.6 +++ b/Dockerfiles/base/Dockerfile-5.6 @@ -20,7 +20,8 @@ LABEL \ ENV MY_USER="devilbox" \ MY_GROUP="devilbox" \ MY_UID="1000" \ - MY_GID="1000" + MY_GID="1000" \ + PHP_VERSION="5.6" ### diff --git a/Dockerfiles/base/Dockerfile-7.0 b/Dockerfiles/base/Dockerfile-7.0 index 6772aef5..01d79eec 100644 --- a/Dockerfiles/base/Dockerfile-7.0 +++ b/Dockerfiles/base/Dockerfile-7.0 @@ -20,7 +20,8 @@ LABEL \ ENV MY_USER="devilbox" \ MY_GROUP="devilbox" \ MY_UID="1000" \ - MY_GID="1000" + MY_GID="1000" \ + PHP_VERSION="7.0" ### diff --git a/Dockerfiles/base/Dockerfile-7.1 b/Dockerfiles/base/Dockerfile-7.1 index b7cb0407..b032b23c 100644 --- a/Dockerfiles/base/Dockerfile-7.1 +++ b/Dockerfiles/base/Dockerfile-7.1 @@ -20,7 +20,8 @@ LABEL \ ENV MY_USER="devilbox" \ MY_GROUP="devilbox" \ MY_UID="1000" \ - MY_GID="1000" + MY_GID="1000" \ + PHP_VERSION="7.1" ### diff --git a/Dockerfiles/base/Dockerfile-7.2 b/Dockerfiles/base/Dockerfile-7.2 index fcf4ca89..eab7472e 100644 --- a/Dockerfiles/base/Dockerfile-7.2 +++ b/Dockerfiles/base/Dockerfile-7.2 @@ -20,7 +20,8 @@ LABEL \ ENV MY_USER="devilbox" \ MY_GROUP="devilbox" \ MY_UID="1000" \ - MY_GID="1000" + MY_GID="1000" \ + PHP_VERSION="7.2" ### diff --git a/Dockerfiles/base/Dockerfile-7.3 b/Dockerfiles/base/Dockerfile-7.3 index 75d714dc..2a3b6f0d 100644 --- a/Dockerfiles/base/Dockerfile-7.3 +++ b/Dockerfiles/base/Dockerfile-7.3 @@ -20,7 +20,8 @@ LABEL \ ENV MY_USER="devilbox" \ MY_GROUP="devilbox" \ MY_UID="1000" \ - MY_GID="1000" + MY_GID="1000" \ + PHP_VERSION="7.3" ### diff --git a/Makefile b/Makefile index 61427b56..b65a09bb 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,7 @@ help: @printf "%s\n" "make rebuild-prod: Rebuild all prod images" @printf "%s\n" "make rebuild-work: Rebuild all work images" @printf "\n" + @printf "%s\n" "make build-base-52: Build PHP 5.2 base image" @printf "%s\n" "make build-base-53: Build PHP 5.3 base image" @printf "%s\n" "make build-base-54: Build PHP 5.4 base image" @printf "%s\n" "make build-base-55: Build PHP 5.5 base image" @@ -36,6 +37,7 @@ help: @printf "%s\n" "make build-base-72: Build PHP 7.2 base image" @printf "%s\n" "make build-base-73: Build PHP 7.3 base image" @printf "\n" + @printf "%s\n" "make build-mods-52: Build PHP 5.2 mods image" @printf "%s\n" "make build-mods-53: Build PHP 5.3 mods image" @printf "%s\n" "make build-mods-54: Build PHP 5.4 mods image" @printf "%s\n" "make build-mods-55: Build PHP 5.5 mods image" @@ -45,6 +47,7 @@ help: @printf "%s\n" "make build-mods-72: Build PHP 7.2 mods image" @printf "%s\n" "make build-mods-73: Build PHP 7.3 mods image" @printf "\n" + @printf "%s\n" "make build-prod-52: Build PHP 5.2 prod image" @printf "%s\n" "make build-prod-53: Build PHP 5.3 prod image" @printf "%s\n" "make build-prod-54: Build PHP 5.4 prod image" @printf "%s\n" "make build-prod-55: Build PHP 5.5 prod image" @@ -54,6 +57,7 @@ help: @printf "%s\n" "make build-prod-72: Build PHP 7.2 prod image" @printf "%s\n" "make build-prod-73: Build PHP 7.3 prod image" @printf "\n" + @printf "%s\n" "make build-work-52: Build PHP 5.2 work image" @printf "%s\n" "make build-work-54: Build PHP 5.3 work image" @printf "%s\n" "make build-work-54: Build PHP 5.4 work image" @printf "%s\n" "make build-work-55: Build PHP 5.5 work image" @@ -63,6 +67,7 @@ help: @printf "%s\n" "make build-work-72: Build PHP 7.2 work image" @printf "%s\n" "make build-work-73: Build PHP 7.3 work image" @printf "\n" + @printf "%s\n" "make rebuild-base-52: Build PHP 5.2 base image" @printf "%s\n" "make rebuild-base-53: Build PHP 5.3 base image" @printf "%s\n" "make rebuild-base-54: Build PHP 5.4 base image" @printf "%s\n" "make rebuild-base-55: Build PHP 5.5 base image" @@ -72,6 +77,7 @@ help: @printf "%s\n" "make rebuild-base-72: Build PHP 7.2 base image" @printf "%s\n" "make rebuild-base-73: Build PHP 7.3 base image" @printf "\n" + @printf "%s\n" "make rebuild-mods-52: Build PHP 5.2 mods image" @printf "%s\n" "make rebuild-mods-53: Build PHP 5.3 mods image" @printf "%s\n" "make rebuild-mods-54: Build PHP 5.4 mods image" @printf "%s\n" "make rebuild-mods-55: Build PHP 5.5 mods image" @@ -81,6 +87,7 @@ help: @printf "%s\n" "make rebuild-mods-72: Build PHP 7.2 mods image" @printf "%s\n" "make rebuild-mods-73: Build PHP 7.3 mods image" @printf "\n" + @printf "%s\n" "make rebuild-prod-52: Build PHP 5.2 prod image" @printf "%s\n" "make rebuild-prod-53: Build PHP 5.3 prod image" @printf "%s\n" "make rebuild-prod-54: Build PHP 5.4 prod image" @printf "%s\n" "make rebuild-prod-55: Build PHP 5.5 prod image" @@ -90,6 +97,7 @@ help: @printf "%s\n" "make rebuild-prod-72: Build PHP 7.2 prod image" @printf "%s\n" "make rebuild-prod-73: Build PHP 7.3 prod image" @printf "\n" + @printf "%s\n" "make rebuild-work-52: Build PHP 5.2 work image" @printf "%s\n" "make rebuild-work-53: Build PHP 5.3 work image" @printf "%s\n" "make rebuild-work-54: Build PHP 5.4 work image" @printf "%s\n" "make rebuild-work-55: Build PHP 5.5 work image" @@ -133,21 +141,23 @@ rebuild-all: rebuild-base rebuild-mods rebuild-prod rebuild-work ### ### Build categories ### -build-base: build-base-53 build-base-54 build-base-55 build-base-56 build-base-70 build-base-71 build-base-72 build-base-73 -build-mods: build-mods-53 build-mods-54 build-mods-55 build-mods-56 build-mods-70 build-mods-71 build-mods-72 build-mods-73 -build-prod: build-prod-53 build-prod-54 build-prod-55 build-prod-56 build-prod-70 build-prod-71 build-prod-72 build-prod-73 -build-work: build-work-53 build-work-54 build-work-55 build-work-56 build-work-70 build-work-71 build-work-72 build-work-73 +build-base: build-base-52 build-base-53 build-base-54 build-base-55 build-base-56 build-base-70 build-base-71 build-base-72 build-base-73 +build-mods: build-mods-52 build-mods-53 build-mods-54 build-mods-55 build-mods-56 build-mods-70 build-mods-71 build-mods-72 build-mods-73 +build-prod: build-prod-52 build-prod-53 build-prod-54 build-prod-55 build-prod-56 build-prod-70 build-prod-71 build-prod-72 build-prod-73 +build-work: build-work-52 build-work-53 build-work-54 build-work-55 build-work-56 build-work-70 build-work-71 build-work-72 build-work-73 -rebuild-base: rebuild-base-53 rebuild-base-54 rebuild-base-55 rebuild-base-56 rebuild-base-70 rebuild-base-71 rebuild-base-72 rebuild-base-73 -rebuild-mods: rebuild-mods-53 rebuild-mods-54 rebuild-mods-55 rebuild-mods-56 rebuild-mods-70 rebuild-mods-71 rebuild-mods-72 rebuild-mods-73 -rebuild-prod: rebuild-prod-53 rebuild-prod-54 rebuild-prod-55 rebuild-prod-56 rebuild-prod-70 rebuild-prod-71 rebuild-prod-72 rebuild-prod-73 -rebuild-work: rebuild-work-53 rebuild-work-54 rebuild-work-55 rebuild-work-56 rebuild-work-70 rebuild-work-71 rebuild-work-72 rebuild-work-73 +rebuild-base: rebuild-base-52 rebuild-base-53 rebuild-base-54 rebuild-base-55 rebuild-base-56 rebuild-base-70 rebuild-base-71 rebuild-base-72 rebuild-base-73 +rebuild-mods: rebuild-mods-52 rebuild-mods-53 rebuild-mods-54 rebuild-mods-55 rebuild-mods-56 rebuild-mods-70 rebuild-mods-71 rebuild-mods-72 rebuild-mods-73 +rebuild-prod: rebuild-prod-52 rebuild-prod-53 rebuild-prod-54 rebuild-prod-55 rebuild-prod-56 rebuild-prod-70 rebuild-prod-71 rebuild-prod-72 rebuild-prod-73 +rebuild-work: rebuild-work-52 rebuild-work-53 rebuild-work-54 rebuild-work-55 rebuild-work-56 rebuild-work-70 rebuild-work-71 rebuild-work-72 rebuild-work-73 ### ### Build separately ### +build-base-52: pull-from-52 + docker build -t devilbox/php-fpm:5.2-base -f $(location)/base/Dockerfile-5.2 $(location)/base build-base-53: pull-from-53 docker build -t devilbox/php-fpm:5.3-base -f $(location)/base/Dockerfile-5.3 $(location)/base build-base-54: pull-from-54 @@ -165,6 +175,8 @@ build-base-72: pull-from-72 build-base-73: pull-from-73 docker build -t devilbox/php-fpm:7.3-base -f $(location)/base/Dockerfile-7.3 $(location)/base +build-mods-52: + docker build -t devilbox/php-fpm:5.2-mods -f $(location)/mods/Dockerfile-5.2 $(location)/mods build-mods-53: docker build -t devilbox/php-fpm:5.3-mods -f $(location)/mods/Dockerfile-5.3 $(location)/mods build-mods-54: @@ -182,6 +194,8 @@ build-mods-72: build-mods-73: docker build -t devilbox/php-fpm:7.3-mods -f $(location)/mods/Dockerfile-7.3 $(location)/mods +build-prod-52: + docker build -t devilbox/php-fpm:5.2-prod -f $(location)/prod/Dockerfile-5.2 $(location)/prod build-prod-53: docker build -t devilbox/php-fpm:5.3-prod -f $(location)/prod/Dockerfile-5.3 $(location)/prod build-prod-54: @@ -199,6 +213,8 @@ build-prod-72: build-prod-73: docker build -t devilbox/php-fpm:7.3-prod -f $(location)/prod/Dockerfile-7.3 $(location)/prod +build-work-52: + docker build -t devilbox/php-fpm:5.2-work -f $(location)/work/Dockerfile-5.2 $(location)/work build-work-53: docker build -t devilbox/php-fpm:5.3-work -f $(location)/work/Dockerfile-5.3 $(location)/work build-work-54: @@ -221,6 +237,8 @@ build-work-73: ### ### Rebuild separately ### +rebuild-base-52: pull-from-52 + docker build --no-cache -t devilbox/php-fpm:5.2-base -f $(location)/base/Dockerfile-5.2 $(location)/base rebuild-base-53: pull-from-53 docker build --no-cache -t devilbox/php-fpm:5.3-base -f $(location)/base/Dockerfile-5.3 $(location)/base rebuild-base-54: pull-from-54 @@ -238,6 +256,8 @@ rebuild-base-72: pull-from-72 rebuild-base-73: pull-from-73 docker build --no-cache -t devilbox/php-fpm:7.3-base -f $(location)/base/Dockerfile-7.3 $(location)/base +rebuild-mods-52: + docker build --no-cache -t devilbox/php-fpm:5.2-mods -f $(location)/mods/Dockerfile-5.2 $(location)/mods rebuild-mods-53: docker build --no-cache -t devilbox/php-fpm:5.3-mods -f $(location)/mods/Dockerfile-5.3 $(location)/mods rebuild-mods-54: @@ -255,6 +275,8 @@ rebuild-mods-72: rebuild-mods-73: docker build --no-cache -t devilbox/php-fpm:7.3-mods -f $(location)/mods/Dockerfile-7.3 $(location)/mods +rebuild-prod-52: + docker build --no-cache -t devilbox/php-fpm:5.2-prod -f $(location)/prod/Dockerfile-5.2 $(location)/prod rebuild-prod-53: docker build --no-cache -t devilbox/php-fpm:5.3-prod -f $(location)/prod/Dockerfile-5.3 $(location)/prod rebuild-prod-54: @@ -272,6 +294,8 @@ rebuild-prod-72: rebuild-prod-73: docker build --no-cache -t devilbox/php-fpm:7.3-prod -f $(location)/prod/Dockerfile-7.3 $(location)/prod +rebuild-work-52: + docker build --no-cache -t devilbox/php-fpm:5.2-work -f $(location)/work/Dockerfile-5.2 $(location)/work rebuild-work-53: docker build --no-cache -t devilbox/php-fpm:5.3-work -f $(location)/work/Dockerfile-5.3 $(location)/work rebuild-work-54: @@ -294,6 +318,8 @@ rebuild-work-73: ### ### Pull base FROM images ### +pull-from-52: + docker pull $(shell grep FROM $(location)/base/Dockerfile-5.2 | sed 's/^FROM//g'; done) pull-from-53: docker pull $(shell grep FROM $(location)/base/Dockerfile-5.3 | sed 's/^FROM//g'; done) pull-from-54: @@ -316,6 +342,8 @@ pull-from-73: ### ### Tests ### +test-base-52: + ./tests/test.sh 5.2 base test-base-53: ./tests/test.sh 5.3 base test-base-54: @@ -333,6 +361,8 @@ test-base-72: test-base-73: ./tests/test.sh 7.3 base +test-mods-52: + ./tests/test.sh 5.2 mods test-mods-53: ./tests/test.sh 5.3 mods test-mods-54: @@ -350,6 +380,8 @@ test-mods-72: test-mods-73: ./tests/test.sh 7.3 mods +test-prod-52: + ./tests/test.sh 5.2 prod test-prod-53: ./tests/test.sh 5.3 prod test-prod-54: @@ -367,6 +399,8 @@ test-prod-72: test-prod-73: ./tests/test.sh 7.3 prod +test-work-52: + ./tests/test.sh 5.2 work test-work-53: ./tests/test.sh 5.3 work test-work-54: diff --git a/build/ansible/DOCKERFILES/Dockerfile-base.j2 b/build/ansible/DOCKERFILES/Dockerfile-base.j2 index da51ab90..f1b36712 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-base.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-base.j2 @@ -1,5 +1,7 @@ # Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead. -{% if php_version == 5.3 %} +{% if php_version == 5.2 %} +FROM devilbox/php-fpm-5.2 +{% elif php_version == 5.3 %} FROM devilbox/php-fpm-5.3 {% elif php_version == 7.3 %} FROM devilbox/php-fpm-7.3 @@ -26,7 +28,8 @@ LABEL \ ENV MY_USER="devilbox" \ MY_GROUP="devilbox" \ MY_UID="1000" \ - MY_GID="1000" + MY_GID="1000" \ + PHP_VERSION="{{ php_version }}" ### @@ -64,8 +67,12 @@ RUN set -x \ ### COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d /docker-entrypoint.d +{% if php_version == 5.2 %} +COPY ./data/php-fpm.conf.xml /usr/local/etc/php-fpm.conf +{% else %} COPY ./data/php-fpm.conf /usr/local/etc/php-fpm.conf COPY ./data/php-fpm.d /usr/local/etc/php-fpm.d +{% endif %} {% if php_version == 5.3 %} COPY ./data/php-fpm.d-docker-5.3.conf /usr/local/etc/php-fpm.d/docker.conf {% endif %} diff --git a/build/ansible/group_vars/all.yml b/build/ansible/group_vars/all.yml index d3ded830..32053bde 100644 --- a/build/ansible/group_vars/all.yml +++ b/build/ansible/group_vars/all.yml @@ -19,6 +19,7 @@ debug: True # All available PHP version php_all_versions: + - 5.2 - 5.3 - 5.4 - 5.5 @@ -172,11 +173,18 @@ software_available: && npm install -g mdlint \ && npm install -g gulp \ composer: + disabled: [5.2] check: composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' all: command: curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer drush: + disabled: [5.2] check: drush --version | grep -E '[.0-9]+' + 5.2: + pre: | + git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \ + && cd /usr/local/src/drush \ + && git checkout 7.4.0 \ 5.3: pre: | git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \ @@ -207,13 +215,14 @@ software_available: && rm -rf /usr/local/src/drush/misc \ && rm -rf /usr/local/src/drush/tests \ codeception: + disabled: [5.2] check: codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' all: command: | COMPOSER_HOME="{{ compose_home }}" composer global require codeception/codeception --dev \ && ln -s {{ compose_home }}/vendor/codeception/codeception/codecept /usr/local/bin/codecept \ drupalconsole: - disabled: [5.3, 5.4] + disabled: [5.2, 5.3, 5.4] check: drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' all: command: curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal @@ -232,7 +241,7 @@ software_available: command: npm install -g grunt grunt-cli laravel: check: laravel --version | grep -E '(Installer|version)\s*[.0-9]+' - disabled: [5.3] + disabled: [5.2, 5.3] 5.4: pre: | git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ @@ -310,6 +319,11 @@ software_available: phalcon: disabled: [7.3] check: phalcon commands | grep -E '[.0-9]+' + 5.2: + pre: | + git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ + && cd /usr/local/src/phalcon-devtools \ + && git checkout v2.0.7 \ 5.3: pre: | git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ @@ -333,6 +347,10 @@ software_available: && rm -rf /usr/local/src/phalcon-devtools/.git \ phpcs: check: phpcs --version | grep -E 'version [.0-9]+' + 5.2: + command: | + curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ + && chmod +x /usr/local/bin/phpcs \ 5.3: command: | curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ @@ -343,6 +361,10 @@ software_available: && chmod +x /usr/local/bin/phpcs \ phpcbf: check: phpcbf --version | grep -E 'version [.0-9]+' + 5.2: + command: | + curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ + && chmod +x /usr/local/bin/phpcbf \ 5.3: command: | curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ @@ -352,8 +374,8 @@ software_available: curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ photon: + disabled: [5.2, 5.3, 5.4] check: photon --version | grep -E 'Installer [.0-9]+' - disabled: [5.3, 5.4] all: command: | COMPOSER_HOME="{{ compose_home }}" composer global require "photoncms/installer" \ @@ -363,7 +385,7 @@ software_available: all: command: gem install sass symfony: - disabled: [5.3] + disabled: [5.2, 5.3] check: symfony --version | grep -E 'version\s*[.0-9]+' all: command: curl https://symfony.com/installer -L -o /usr/local/bin/symfony @@ -529,6 +551,10 @@ extensions_enabled: extensions_available: amqp: disabled: [7.3] + 5.2: + run_dep: [librabbitmq1] + type: pecl + version: 1.4.0 5.3: run_dep: [librabbitmq1] 5.4: @@ -541,6 +567,7 @@ extensions_available: build_dep: [librabbitmq-dev] run_dep: [librabbitmq4] apcu: + disabled: [5.2] 5.3: type: pecl version: 4.0.11 @@ -581,6 +608,9 @@ extensions_available: configure: --with-libxml-dir=/usr build_dep: [libxml2-dev] enchant: + 5.2: + type: pecl + command: echo "/usr" | pecl install enchant all: type: builtin build_dep: [libenchant-dev] @@ -589,6 +619,9 @@ extensions_available: all: type: builtin fileinfo: + 5.2: + type: pecl + build_dep: [libmagic-dev] all: type: builtin filter: @@ -599,6 +632,17 @@ extensions_available: configure: --with-openssl-dir build_dep: [libssl-dev] gd: + 5.2: + type: builtin + pre: | + ln -s /usr/lib/x86_64-linux-gnu/libjpeg.* /usr/lib/ && \ + ln -s /usr/lib/x86_64-linux-gnu/libpng.* /usr/lib/ && \ + ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ && \ + mkdir /usr/include/freetype2/freetype && \ + ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h \ + configure: --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf + build_dep: [libpng-dev, libjpeg-dev, libxpm-dev, libvpx-dev, zlib1g-dev, libfreetype6-dev] + run_dep: [libpng12-0, libjpeg62-turbo, libxpm4, libvpx1, libfreetype6] 5.3: type: builtin pre: ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ && mkdir /usr/include/freetype2/freetype && ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h @@ -643,6 +687,7 @@ extensions_available: all: type: builtin gmp: + disabled: [5.2] all: type: builtin pre: ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ @@ -657,6 +702,7 @@ extensions_available: all: type: pecl imagick: + disabled: [5.2] 5.3: type: pecl version: 3.3.0 @@ -684,6 +730,9 @@ extensions_available: build_dep: [libfbclient2, libib-util, firebird-dev] run_dep: [libfbclient2] intl: + 5.2: + type: pecl + run_dep: [libicu52] 5.3: type: builtin run_dep: [libicu52] @@ -758,6 +807,9 @@ extensions_available: type: pecl build_dep: [zlib1g-dev] memcached: + 5.2: + type: pecl + version: 2.1.0 5.3: type: pecl version: 2.2.0 @@ -781,11 +833,15 @@ extensions_available: run_dep: [libmemcachedutil2] mongo: disabled: [7.0, 7.1, 7.2, 7.3] # Deprecated + 5.2: + type: pecl + command: yes | pecl install mongo-1.5.8 all: type: pecl command: yes | pecl install mongo build_dep: [libssl-dev, libsasl2-dev] mongodb: + disabled: [5.2] 5.3: type: pecl version: 0.6.3 @@ -797,6 +853,9 @@ extensions_available: build_dep: [libssl-dev, libsasl2-dev] msgpack: disabled: [7.3] + 5.2: + type: pecl + version: 0.5.7 5.3: type: pecl version: 0.5.7 @@ -829,6 +888,9 @@ extensions_available: odbc: disabled: "{{ php_all_versions }}" # TODO: sqlext.h' not found! opcache: + 5.2: + type: pecl + command: pecl install zendopcache 5.3: type: pecl command: pecl install zendopcache @@ -884,7 +946,12 @@ extensions_available: build_dep: [libpq-dev] run_dep: [libpq5] phalcon: - disabled: [7.3] + disabled: [5.2, 7.3] + 5.2: + type: git + git_url: https://github.com/phalcon/cphalcon + git_ref: phalcon-v2.0.9 + command: cd build && ./install 5.3: type: git git_url: https://github.com/phalcon/cphalcon @@ -909,6 +976,8 @@ extensions_available: phar: # https://github.com/docker-library/php/issues/618 disabled: [5.6, 7.0] # TODO: Currently disabled due to bug in built + 5.2: + type: pecl all: type: builtin build_dep: [libssl-dev] @@ -921,7 +990,7 @@ extensions_available: build_dep: [libpspell-dev] run_dep: [libaspell15] readline: - disabled: [5.3, 5.4] # Available by default + disabled: [5.2, 5.3, 5.4] # Available by default all: type: builtin build_dep: [libedit-dev, libreadline-dev] @@ -931,6 +1000,9 @@ extensions_available: build_dep: [librecode-dev] run_dep: [librecode0] redis: + 5.2: + type: pecl + version: 2.2.7 all: type: pecl session: @@ -961,13 +1033,14 @@ extensions_available: all: type: builtin sodium: - disabled: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1] + disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1] all: type: builtin build_dep: [libsodium-dev] spl: disabled: "{{ php_all_versions }}" # TODO: Did not work swoole: + disabled: [5.2] 5.3: type: pecl version: 1.9.23 @@ -1039,6 +1112,9 @@ extensions_available: all: type: builtin tidy: + 5.2: + type: builtin + run_dep: [libtidy-0.99-0] 5.3: type: builtin run_dep: [libtidy-0.99-0] @@ -1081,6 +1157,9 @@ extensions_available: build_dep: [libxml2-dev] xdebug: disabled: [7.3] + 5.2: + type: pecl + version: 2.2.7 5.3: type: pecl version: 2.2.7 @@ -1122,6 +1201,11 @@ extensions_available: build_dep: [libxslt-dev] run_dep: [libxslt1.1] zip: + 5.2: + type: builtin + configure: --with-zlib-dir=/usr --with-pcre-dir=/usr + build_dep: [zlib1g-dev] + run_dep: [] 5.3: type: builtin configure: --with-zlib-dir=/usr --with-pcre-dir=/usr diff --git a/build/ansible/inventory b/build/ansible/inventory index da44bebb..5fe719c0 100644 --- a/build/ansible/inventory +++ b/build/ansible/inventory @@ -1,4 +1,5 @@ [php] +php-5.2 php_version=5.2 ansible_connection=local php-5.3 php_version=5.3 ansible_connection=local php-5.4 php_version=5.4 ansible_connection=local php-5.5 php_version=5.5 ansible_connection=local diff --git a/build/gen-readme.sh b/build/gen-readme.sh index 4a1ae802..5042d235 100755 --- a/build/gen-readme.sh +++ b/build/gen-readme.sh @@ -14,6 +14,7 @@ CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)" ### print_usage() { echo "Usage: gen-readme.sh" + echo " gen-readme.sh 5.2" echo " gen-readme.sh 5.3" echo " gen-readme.sh 5.4" echo " gen-readme.sh 5.5" @@ -63,6 +64,7 @@ update_readme() { ### if [ "${#}" -eq "0" ]; then # Update PHP modules for all versions at once + update_readme "5.2" update_readme "5.3" update_readme "5.4" update_readme "5.5" @@ -77,8 +79,9 @@ elif [ "${#}" -gt "1" ]; then print_usage exit 1 else - if [ "${1}" != "5.3" ] \ - if [ "${1}" != "5.4" ] \ + if [ "${1}" != "5.2" ] \ + && [ "${1}" != "5.3" ] \ + && [ "${1}" != "5.4" ] \ && [ "${1}" != "5.5" ] \ && [ "${1}" != "5.6" ] \ && [ "${1}" != "7.0" ] \ diff --git a/tests/base/04-test-run_nginx.sh b/tests/base/04-test-run_nginx.sh index cc735394..9a4e66b4 100755 --- a/tests/base/04-test-run_nginx.sh +++ b/tests/base/04-test-run_nginx.sh @@ -71,7 +71,7 @@ run "sleep 10" ### ### Check correct PHP-FPM user ### -if ! docker_exec "${did}" "ps auxw | grep 'php-fpm: pool' | grep -v grep | awk '{ print \$1 }' | head -1 | grep devilbox"; then +if ! docker_exec "${did}" "ps auxw | grep -E '(php-fpm: pool|php-cgi)' | grep -v grep | awk '{ print \$1 }' | tail -1 | grep devilbox"; then docker_exec "${did}" "ps auxw" # Shutdown @@ -82,17 +82,7 @@ if ! docker_exec "${did}" "ps auxw | grep 'php-fpm: pool' | grep -v grep | awk ' echo "Failed" exit 1 fi -if ! docker_exec "${did}" "ps auxw | grep 'php-fpm: pool' | grep -v grep | awk '{ print \$1 }' | tail -1 | grep devilbox"; then - docker_exec "${did}" "ps auxw" - # Shutdown - docker_stop "${ndid}" || true - docker_stop "${did}" || true - rm -rf "${DOC_ROOT_HOST}" - rm -rf "${CONFIG_HOST}" - echo "Failed" - exit 1 -fi ### diff --git a/tests/prod/06-test-mount-custom_fpm_conf.sh b/tests/prod/06-test-mount-custom_fpm_conf.sh index 98a75817..fe1b7723 100755 --- a/tests/prod/06-test-mount-custom_fpm_conf.sh +++ b/tests/prod/06-test-mount-custom_fpm_conf.sh @@ -34,7 +34,24 @@ PHP_CNF_CONT="/etc/php-fpm-custom.d" CONTAINER="nginx:stable" -printf "[www]\nphp_admin_value[memory_limit] = 17M\n" > "${PHP_CNF_HOST}/post.conf" +if [ "${VERSION}" = "5.2" ]; then + { + echo ''; + echo ''; + echo ' '; + echo '
'; + echo ' '; + echo ' 17M'; + echo ' 17M'; + echo ' 17M'; + echo ' '; + echo '
'; + echo '
'; + echo '
'; + } > "${PHP_CNF_HOST}/post.conf" +else + printf "[www]\nphp_admin_value[memory_limit] = 17M\n" > "${PHP_CNF_HOST}/post.conf" +fi echo " "${DOC_ROOT_HOST}/index.php" # Fix mount permissions @@ -122,35 +139,38 @@ fi # Check modified php-fpm.conf -if ! run "curl -q -4 http://127.0.0.1:${WWW_PORT}/index.php 2>/dev/null | grep memory_limit | grep '17M'"; then - # Info - run "netstat -tuln" - run "curl -4 http://127.0.0.1:${WWW_PORT}/index.php | grep memory_limit" || true - run "docker ps --no-trunc" - docker_exec "${ndid}" "nginx -t" - - # Show logs - docker_logs "${ndid}" || true - docker_logs "${did}" || true - - # Ensure file is available - docker_exec "${ndid}" "ls -la ${DOC_ROOT_CONT}/" - docker_exec "${did}" "ls -la ${DOC_ROOT_CONT}/" - - docker_exec "${ndid}" "cat ${DOC_ROOT_CONT}/index.php" - docker_exec "${did}" "cat ${DOC_ROOT_CONT}/index.php" - - # Nginx configuration - docker_exec "${ndid}" "cat ${CONFIG_CONT}/php.conf" - - # Shutdown - docker_stop "${ndid}" || true - docker_stop "${did}" || true - rm -rf "${DOC_ROOT_HOST}" - rm -rf "${CONFIG_HOST}" - rm -rf "${PHP_CNF_HOST}" - echo "Failed" - exit 1 +# Does not work with PHP 5.2 +if [ "${VERSION}" != "5.2" ]; then + if ! run "curl -q -4 http://127.0.0.1:${WWW_PORT}/index.php 2>/dev/null | grep memory_limit | grep '17M'"; then + # Info + run "netstat -tuln" + run "curl -4 http://127.0.0.1:${WWW_PORT}/index.php | grep memory_limit" || true + run "docker ps --no-trunc" + docker_exec "${ndid}" "nginx -t" + + # Show logs + docker_logs "${ndid}" || true + docker_logs "${did}" || true + + # Ensure file is available + docker_exec "${ndid}" "ls -la ${DOC_ROOT_CONT}/" + docker_exec "${did}" "ls -la ${DOC_ROOT_CONT}/" + + docker_exec "${ndid}" "cat ${DOC_ROOT_CONT}/index.php" + docker_exec "${did}" "cat ${DOC_ROOT_CONT}/index.php" + + # Nginx configuration + docker_exec "${ndid}" "cat ${CONFIG_CONT}/php.conf" + + # Shutdown + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${DOC_ROOT_HOST}" + rm -rf "${CONFIG_HOST}" + rm -rf "${PHP_CNF_HOST}" + echo "Failed" + exit 1 + fi fi From 5aa7a77aba6db154eb32151ba254d4fe63c1d6e3 Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 2 Aug 2018 15:21:55 +0200 Subject: [PATCH 07/24] Fixes #21 Turn off Xdebug by default --- Dockerfiles/base/data/php-ini.d/php-5.2.ini | 7 +++++++ Dockerfiles/base/data/php-ini.d/php-5.3.ini | 7 +++++++ Dockerfiles/base/data/php-ini.d/php-5.4.ini | 7 +++++++ Dockerfiles/base/data/php-ini.d/php-5.5.ini | 7 +++++++ Dockerfiles/base/data/php-ini.d/php-5.6.ini | 7 +++++++ Dockerfiles/base/data/php-ini.d/php-7.0.ini | 7 +++++++ Dockerfiles/base/data/php-ini.d/php-7.1.ini | 7 +++++++ Dockerfiles/base/data/php-ini.d/php-7.2.ini | 7 +++++++ Dockerfiles/base/data/php-ini.d/php-7.3.ini | 7 +++++++ Dockerfiles/work/data/php-ini.d/php-5.2.ini | 7 +++++++ Dockerfiles/work/data/php-ini.d/php-5.3.ini | 7 +++++++ Dockerfiles/work/data/php-ini.d/php-5.4.ini | 7 +++++++ Dockerfiles/work/data/php-ini.d/php-5.5.ini | 7 +++++++ Dockerfiles/work/data/php-ini.d/php-5.6.ini | 7 +++++++ Dockerfiles/work/data/php-ini.d/php-7.0.ini | 7 +++++++ Dockerfiles/work/data/php-ini.d/php-7.1.ini | 7 +++++++ Dockerfiles/work/data/php-ini.d/php-7.2.ini | 7 +++++++ Dockerfiles/work/data/php-ini.d/php-7.3.ini | 7 +++++++ build/ansible/CONFIGURATIONS/php.ini.j2 | 7 +++++++ build/ansible/group_vars/all.yml | 11 +++++++++++ 20 files changed, 144 insertions(+) diff --git a/Dockerfiles/base/data/php-ini.d/php-5.2.ini b/Dockerfiles/base/data/php-ini.d/php-5.2.ini index 87b43beb..80dce909 100644 --- a/Dockerfiles/base/data/php-ini.d/php-5.2.ini +++ b/Dockerfiles/base/data/php-ini.d/php-5.2.ini @@ -40,3 +40,10 @@ display_startup_errors = Off track_errors = On log_errors = On html_errors = Off + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off diff --git a/Dockerfiles/base/data/php-ini.d/php-5.3.ini b/Dockerfiles/base/data/php-ini.d/php-5.3.ini index 69784585..1ad9bc61 100644 --- a/Dockerfiles/base/data/php-ini.d/php-5.3.ini +++ b/Dockerfiles/base/data/php-ini.d/php-5.3.ini @@ -40,3 +40,10 @@ display_startup_errors = Off track_errors = On log_errors = On html_errors = Off + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off diff --git a/Dockerfiles/base/data/php-ini.d/php-5.4.ini b/Dockerfiles/base/data/php-ini.d/php-5.4.ini index 321d0aca..936d1df4 100644 --- a/Dockerfiles/base/data/php-ini.d/php-5.4.ini +++ b/Dockerfiles/base/data/php-ini.d/php-5.4.ini @@ -41,3 +41,10 @@ display_startup_errors = Off track_errors = On log_errors = On html_errors = Off + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off diff --git a/Dockerfiles/base/data/php-ini.d/php-5.5.ini b/Dockerfiles/base/data/php-ini.d/php-5.5.ini index 759543f3..6b9ef0ec 100644 --- a/Dockerfiles/base/data/php-ini.d/php-5.5.ini +++ b/Dockerfiles/base/data/php-ini.d/php-5.5.ini @@ -41,3 +41,10 @@ display_startup_errors = Off track_errors = On log_errors = On html_errors = Off + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off diff --git a/Dockerfiles/base/data/php-ini.d/php-5.6.ini b/Dockerfiles/base/data/php-ini.d/php-5.6.ini index c9235808..ba2a39e8 100644 --- a/Dockerfiles/base/data/php-ini.d/php-5.6.ini +++ b/Dockerfiles/base/data/php-ini.d/php-5.6.ini @@ -41,3 +41,10 @@ display_startup_errors = Off track_errors = On log_errors = On html_errors = Off + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off diff --git a/Dockerfiles/base/data/php-ini.d/php-7.0.ini b/Dockerfiles/base/data/php-ini.d/php-7.0.ini index 443affb9..a5ae47a4 100644 --- a/Dockerfiles/base/data/php-ini.d/php-7.0.ini +++ b/Dockerfiles/base/data/php-ini.d/php-7.0.ini @@ -41,3 +41,10 @@ display_startup_errors = Off track_errors = On log_errors = On html_errors = Off + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off diff --git a/Dockerfiles/base/data/php-ini.d/php-7.1.ini b/Dockerfiles/base/data/php-ini.d/php-7.1.ini index 2e6f49fb..68e58321 100644 --- a/Dockerfiles/base/data/php-ini.d/php-7.1.ini +++ b/Dockerfiles/base/data/php-ini.d/php-7.1.ini @@ -41,3 +41,10 @@ display_startup_errors = Off track_errors = On log_errors = On html_errors = Off + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off diff --git a/Dockerfiles/base/data/php-ini.d/php-7.2.ini b/Dockerfiles/base/data/php-ini.d/php-7.2.ini index c50b1a22..1c41a924 100644 --- a/Dockerfiles/base/data/php-ini.d/php-7.2.ini +++ b/Dockerfiles/base/data/php-ini.d/php-7.2.ini @@ -40,3 +40,10 @@ display_errors = Off display_startup_errors = Off log_errors = On html_errors = Off + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off diff --git a/Dockerfiles/base/data/php-ini.d/php-7.3.ini b/Dockerfiles/base/data/php-ini.d/php-7.3.ini index 75132c61..db61d268 100644 --- a/Dockerfiles/base/data/php-ini.d/php-7.3.ini +++ b/Dockerfiles/base/data/php-ini.d/php-7.3.ini @@ -40,3 +40,10 @@ display_errors = Off display_startup_errors = Off log_errors = On html_errors = Off + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off diff --git a/Dockerfiles/work/data/php-ini.d/php-5.2.ini b/Dockerfiles/work/data/php-ini.d/php-5.2.ini index 08956af0..e58a7517 100644 --- a/Dockerfiles/work/data/php-ini.d/php-5.2.ini +++ b/Dockerfiles/work/data/php-ini.d/php-5.2.ini @@ -40,3 +40,10 @@ display_startup_errors = On track_errors = On log_errors = On html_errors = On + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off diff --git a/Dockerfiles/work/data/php-ini.d/php-5.3.ini b/Dockerfiles/work/data/php-ini.d/php-5.3.ini index 2683937f..42bf4740 100644 --- a/Dockerfiles/work/data/php-ini.d/php-5.3.ini +++ b/Dockerfiles/work/data/php-ini.d/php-5.3.ini @@ -40,3 +40,10 @@ display_startup_errors = On track_errors = On log_errors = On html_errors = On + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off diff --git a/Dockerfiles/work/data/php-ini.d/php-5.4.ini b/Dockerfiles/work/data/php-ini.d/php-5.4.ini index 23607412..80249001 100644 --- a/Dockerfiles/work/data/php-ini.d/php-5.4.ini +++ b/Dockerfiles/work/data/php-ini.d/php-5.4.ini @@ -41,3 +41,10 @@ display_startup_errors = On track_errors = On log_errors = On html_errors = On + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off diff --git a/Dockerfiles/work/data/php-ini.d/php-5.5.ini b/Dockerfiles/work/data/php-ini.d/php-5.5.ini index b2d9415e..d1e947c6 100644 --- a/Dockerfiles/work/data/php-ini.d/php-5.5.ini +++ b/Dockerfiles/work/data/php-ini.d/php-5.5.ini @@ -41,3 +41,10 @@ display_startup_errors = On track_errors = On log_errors = On html_errors = On + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off diff --git a/Dockerfiles/work/data/php-ini.d/php-5.6.ini b/Dockerfiles/work/data/php-ini.d/php-5.6.ini index 539150df..85867c70 100644 --- a/Dockerfiles/work/data/php-ini.d/php-5.6.ini +++ b/Dockerfiles/work/data/php-ini.d/php-5.6.ini @@ -41,3 +41,10 @@ display_startup_errors = On track_errors = On log_errors = On html_errors = On + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off diff --git a/Dockerfiles/work/data/php-ini.d/php-7.0.ini b/Dockerfiles/work/data/php-ini.d/php-7.0.ini index 25b3ceba..bb0da45c 100644 --- a/Dockerfiles/work/data/php-ini.d/php-7.0.ini +++ b/Dockerfiles/work/data/php-ini.d/php-7.0.ini @@ -41,3 +41,10 @@ display_startup_errors = On track_errors = On log_errors = On html_errors = On + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off diff --git a/Dockerfiles/work/data/php-ini.d/php-7.1.ini b/Dockerfiles/work/data/php-ini.d/php-7.1.ini index 863c37f7..89816be0 100644 --- a/Dockerfiles/work/data/php-ini.d/php-7.1.ini +++ b/Dockerfiles/work/data/php-ini.d/php-7.1.ini @@ -41,3 +41,10 @@ display_startup_errors = On track_errors = On log_errors = On html_errors = On + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off diff --git a/Dockerfiles/work/data/php-ini.d/php-7.2.ini b/Dockerfiles/work/data/php-ini.d/php-7.2.ini index a8b43c87..cd9da8d7 100644 --- a/Dockerfiles/work/data/php-ini.d/php-7.2.ini +++ b/Dockerfiles/work/data/php-ini.d/php-7.2.ini @@ -40,3 +40,10 @@ display_errors = On display_startup_errors = On log_errors = On html_errors = On + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off diff --git a/Dockerfiles/work/data/php-ini.d/php-7.3.ini b/Dockerfiles/work/data/php-ini.d/php-7.3.ini index 15d063a0..3888e66b 100644 --- a/Dockerfiles/work/data/php-ini.d/php-7.3.ini +++ b/Dockerfiles/work/data/php-ini.d/php-7.3.ini @@ -40,3 +40,10 @@ display_errors = On display_startup_errors = On log_errors = On html_errors = On + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off diff --git a/build/ansible/CONFIGURATIONS/php.ini.j2 b/build/ansible/CONFIGURATIONS/php.ini.j2 index 8fc2a694..40ad4a81 100644 --- a/build/ansible/CONFIGURATIONS/php.ini.j2 +++ b/build/ansible/CONFIGURATIONS/php.ini.j2 @@ -47,3 +47,10 @@ track_errors = {{ item.cfg[item.key].track_errors | default(item.cfg[ {% endif %} log_errors = {{ item.cfg[item.key].log_errors | default(item.cfg[item.alt].log_errors) }} html_errors = {{ item.cfg[item.key].html_errors | default(item.cfg[item.alt].html_errors) }} + + +; Xdebug settings +xdebug.default_enable = {{ item.cfg[item.key].xdebug_default_enable | default(item.cfg[item.alt].xdebug_default_enable) }} +xdebug.profiler_enable = {{ item.cfg[item.key].xdebug_profiler_enable | default(item.cfg[item.alt].xdebug_profiler_enable) }} +xdebug.remote_enable = {{ item.cfg[item.key].xdebug_remote_enable | default(item.cfg[item.alt].xdebug_remote_enable) }} +xdebug.remote_autostart = {{ item.cfg[item.key].xdebug_remote_autostart | default(item.cfg[item.alt].xdebug_remote_autostart) }} diff --git a/build/ansible/group_vars/all.yml b/build/ansible/group_vars/all.yml index 999d1721..8e9022ac 100644 --- a/build/ansible/group_vars/all.yml +++ b/build/ansible/group_vars/all.yml @@ -80,6 +80,12 @@ php_settings_ini: track_errors: "{{ php_settings_all.base.track_errors }}" log_errors: "{{ php_settings_all.base.log_errors }}" html_errors: "{{ php_settings_all.base.html_errors }}" + # Xdebug settings + xdebug_default_enable: 'Off' + xdebug_profiler_enable: 'Off' + xdebug_remote_enable: 'Off' + xdebug_remote_autostart: 'Off' + # ---- Inherits from base ---- mods: # ---- Inherits from base ---- @@ -95,6 +101,11 @@ php_settings_ini: track_errors: "{{ php_settings_all.work.track_errors }}" log_errors: "{{ php_settings_all.work.log_errors }}" html_errors: "{{ php_settings_all.work.html_errors }}" + # Xdebug settings + xdebug_default_enable: 'Off' + xdebug_profiler_enable: 'Off' + xdebug_remote_enable: 'Off' + xdebug_remote_autostart: 'Off' ### From 0975d97ca3a0bdba9cc0a34e62e9251272084487 Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 2 Aug 2018 15:22:50 +0200 Subject: [PATCH 08/24] Apply sane PHP settings only via php.ini, not additionally via php-fpm.conf --- .../base/data/php-fpm.d/php-fpm.d-5.3.conf | 13 ------------- .../base/data/php-fpm.d/php-fpm.d-5.4.conf | 13 ------------- .../base/data/php-fpm.d/php-fpm.d-5.5.conf | 13 ------------- .../base/data/php-fpm.d/php-fpm.d-5.6.conf | 13 ------------- .../base/data/php-fpm.d/php-fpm.d-7.0.conf | 13 ------------- .../base/data/php-fpm.d/php-fpm.d-7.1.conf | 13 ------------- .../base/data/php-fpm.d/php-fpm.d-7.2.conf | 12 ------------ .../base/data/php-fpm.d/php-fpm.d-7.3.conf | 12 ------------ .../work/data/php-fpm.d/php-fpm.d-5.3.conf | 13 ------------- .../work/data/php-fpm.d/php-fpm.d-5.4.conf | 13 ------------- .../work/data/php-fpm.d/php-fpm.d-5.5.conf | 13 ------------- .../work/data/php-fpm.d/php-fpm.d-5.6.conf | 13 ------------- .../work/data/php-fpm.d/php-fpm.d-7.0.conf | 13 ------------- .../work/data/php-fpm.d/php-fpm.d-7.1.conf | 13 ------------- .../work/data/php-fpm.d/php-fpm.d-7.2.conf | 12 ------------ .../work/data/php-fpm.d/php-fpm.d-7.3.conf | 12 ------------ build/ansible/CONFIGURATIONS/php-fpm.d-conf.j2 | 16 ---------------- 17 files changed, 220 deletions(-) diff --git a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.3.conf b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.3.conf index b99b2de9..3d947a95 100644 --- a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.3.conf +++ b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.3.conf @@ -83,16 +83,3 @@ pm.max_requests = 500 [www] user = devilbox group = devilbox - - -; ############################################################ -; PHP settings -; ############################################################ -php_value[error_reporting] = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED -php_flag[xmlrpc_errors] = Off -php_flag[report_memleaks] = On -php_flag[display_errors] = Off -php_flag[display_startup_errors] = Off -php_flag[track_errors] = On -php_flag[log_errors] = On -php_flag[html_errors] = Off diff --git a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.4.conf b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.4.conf index 6ed8472a..af26d252 100644 --- a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.4.conf +++ b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.4.conf @@ -85,16 +85,3 @@ pm.max_requests = 500 [www] user = devilbox group = devilbox - - -; ############################################################ -; PHP settings -; ############################################################ -php_value[error_reporting] = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED -php_flag[xmlrpc_errors] = Off -php_flag[report_memleaks] = On -php_flag[display_errors] = Off -php_flag[display_startup_errors] = Off -php_flag[track_errors] = On -php_flag[log_errors] = On -php_flag[html_errors] = Off diff --git a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.5.conf b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.5.conf index 6ed8472a..af26d252 100644 --- a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.5.conf +++ b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.5.conf @@ -85,16 +85,3 @@ pm.max_requests = 500 [www] user = devilbox group = devilbox - - -; ############################################################ -; PHP settings -; ############################################################ -php_value[error_reporting] = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED -php_flag[xmlrpc_errors] = Off -php_flag[report_memleaks] = On -php_flag[display_errors] = Off -php_flag[display_startup_errors] = Off -php_flag[track_errors] = On -php_flag[log_errors] = On -php_flag[html_errors] = Off diff --git a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.6.conf b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.6.conf index 6ed8472a..af26d252 100644 --- a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.6.conf +++ b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.6.conf @@ -85,16 +85,3 @@ pm.max_requests = 500 [www] user = devilbox group = devilbox - - -; ############################################################ -; PHP settings -; ############################################################ -php_value[error_reporting] = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED -php_flag[xmlrpc_errors] = Off -php_flag[report_memleaks] = On -php_flag[display_errors] = Off -php_flag[display_startup_errors] = Off -php_flag[track_errors] = On -php_flag[log_errors] = On -php_flag[html_errors] = Off diff --git a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.0.conf b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.0.conf index 6ed8472a..af26d252 100644 --- a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.0.conf +++ b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.0.conf @@ -85,16 +85,3 @@ pm.max_requests = 500 [www] user = devilbox group = devilbox - - -; ############################################################ -; PHP settings -; ############################################################ -php_value[error_reporting] = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED -php_flag[xmlrpc_errors] = Off -php_flag[report_memleaks] = On -php_flag[display_errors] = Off -php_flag[display_startup_errors] = Off -php_flag[track_errors] = On -php_flag[log_errors] = On -php_flag[html_errors] = Off diff --git a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.1.conf b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.1.conf index 6ed8472a..af26d252 100644 --- a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.1.conf +++ b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.1.conf @@ -85,16 +85,3 @@ pm.max_requests = 500 [www] user = devilbox group = devilbox - - -; ############################################################ -; PHP settings -; ############################################################ -php_value[error_reporting] = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED -php_flag[xmlrpc_errors] = Off -php_flag[report_memleaks] = On -php_flag[display_errors] = Off -php_flag[display_startup_errors] = Off -php_flag[track_errors] = On -php_flag[log_errors] = On -php_flag[html_errors] = Off diff --git a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.2.conf b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.2.conf index ebff2560..af26d252 100644 --- a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.2.conf +++ b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.2.conf @@ -85,15 +85,3 @@ pm.max_requests = 500 [www] user = devilbox group = devilbox - - -; ############################################################ -; PHP settings -; ############################################################ -php_value[error_reporting] = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED -php_flag[xmlrpc_errors] = Off -php_flag[report_memleaks] = On -php_flag[display_errors] = Off -php_flag[display_startup_errors] = Off -php_flag[log_errors] = On -php_flag[html_errors] = Off diff --git a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.3.conf b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.3.conf index ebff2560..af26d252 100644 --- a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.3.conf +++ b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.3.conf @@ -85,15 +85,3 @@ pm.max_requests = 500 [www] user = devilbox group = devilbox - - -; ############################################################ -; PHP settings -; ############################################################ -php_value[error_reporting] = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED -php_flag[xmlrpc_errors] = Off -php_flag[report_memleaks] = On -php_flag[display_errors] = Off -php_flag[display_startup_errors] = Off -php_flag[log_errors] = On -php_flag[html_errors] = Off diff --git a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.3.conf b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.3.conf index 325c0e42..3d947a95 100644 --- a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.3.conf +++ b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.3.conf @@ -83,16 +83,3 @@ pm.max_requests = 500 [www] user = devilbox group = devilbox - - -; ############################################################ -; PHP settings -; ############################################################ -php_value[error_reporting] = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED -php_flag[xmlrpc_errors] = Off -php_flag[report_memleaks] = On -php_flag[display_errors] = On -php_flag[display_startup_errors] = On -php_flag[track_errors] = On -php_flag[log_errors] = On -php_flag[html_errors] = On diff --git a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.4.conf b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.4.conf index 9ba572b2..af26d252 100644 --- a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.4.conf +++ b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.4.conf @@ -85,16 +85,3 @@ pm.max_requests = 500 [www] user = devilbox group = devilbox - - -; ############################################################ -; PHP settings -; ############################################################ -php_value[error_reporting] = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED -php_flag[xmlrpc_errors] = Off -php_flag[report_memleaks] = On -php_flag[display_errors] = On -php_flag[display_startup_errors] = On -php_flag[track_errors] = On -php_flag[log_errors] = On -php_flag[html_errors] = On diff --git a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.5.conf b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.5.conf index 9ba572b2..af26d252 100644 --- a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.5.conf +++ b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.5.conf @@ -85,16 +85,3 @@ pm.max_requests = 500 [www] user = devilbox group = devilbox - - -; ############################################################ -; PHP settings -; ############################################################ -php_value[error_reporting] = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED -php_flag[xmlrpc_errors] = Off -php_flag[report_memleaks] = On -php_flag[display_errors] = On -php_flag[display_startup_errors] = On -php_flag[track_errors] = On -php_flag[log_errors] = On -php_flag[html_errors] = On diff --git a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.6.conf b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.6.conf index 9ba572b2..af26d252 100644 --- a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.6.conf +++ b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.6.conf @@ -85,16 +85,3 @@ pm.max_requests = 500 [www] user = devilbox group = devilbox - - -; ############################################################ -; PHP settings -; ############################################################ -php_value[error_reporting] = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED -php_flag[xmlrpc_errors] = Off -php_flag[report_memleaks] = On -php_flag[display_errors] = On -php_flag[display_startup_errors] = On -php_flag[track_errors] = On -php_flag[log_errors] = On -php_flag[html_errors] = On diff --git a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.0.conf b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.0.conf index 9ba572b2..af26d252 100644 --- a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.0.conf +++ b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.0.conf @@ -85,16 +85,3 @@ pm.max_requests = 500 [www] user = devilbox group = devilbox - - -; ############################################################ -; PHP settings -; ############################################################ -php_value[error_reporting] = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED -php_flag[xmlrpc_errors] = Off -php_flag[report_memleaks] = On -php_flag[display_errors] = On -php_flag[display_startup_errors] = On -php_flag[track_errors] = On -php_flag[log_errors] = On -php_flag[html_errors] = On diff --git a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.1.conf b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.1.conf index 9ba572b2..af26d252 100644 --- a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.1.conf +++ b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.1.conf @@ -85,16 +85,3 @@ pm.max_requests = 500 [www] user = devilbox group = devilbox - - -; ############################################################ -; PHP settings -; ############################################################ -php_value[error_reporting] = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED -php_flag[xmlrpc_errors] = Off -php_flag[report_memleaks] = On -php_flag[display_errors] = On -php_flag[display_startup_errors] = On -php_flag[track_errors] = On -php_flag[log_errors] = On -php_flag[html_errors] = On diff --git a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.2.conf b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.2.conf index 5494b4b7..af26d252 100644 --- a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.2.conf +++ b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.2.conf @@ -85,15 +85,3 @@ pm.max_requests = 500 [www] user = devilbox group = devilbox - - -; ############################################################ -; PHP settings -; ############################################################ -php_value[error_reporting] = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED -php_flag[xmlrpc_errors] = Off -php_flag[report_memleaks] = On -php_flag[display_errors] = On -php_flag[display_startup_errors] = On -php_flag[log_errors] = On -php_flag[html_errors] = On diff --git a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.3.conf b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.3.conf index 5494b4b7..af26d252 100644 --- a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.3.conf +++ b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.3.conf @@ -85,15 +85,3 @@ pm.max_requests = 500 [www] user = devilbox group = devilbox - - -; ############################################################ -; PHP settings -; ############################################################ -php_value[error_reporting] = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED -php_flag[xmlrpc_errors] = Off -php_flag[report_memleaks] = On -php_flag[display_errors] = On -php_flag[display_startup_errors] = On -php_flag[log_errors] = On -php_flag[html_errors] = On diff --git a/build/ansible/CONFIGURATIONS/php-fpm.d-conf.j2 b/build/ansible/CONFIGURATIONS/php-fpm.d-conf.j2 index 890196e6..c1863127 100644 --- a/build/ansible/CONFIGURATIONS/php-fpm.d-conf.j2 +++ b/build/ansible/CONFIGURATIONS/php-fpm.d-conf.j2 @@ -91,20 +91,4 @@ pm.max_requests = {{ item.cfg[item.key].pm_max_requests | default(item.cfg[item. [www] user = {{ item.cfg[item.key].user | default(item.cfg[item.alt].user) }} group = {{ item.cfg[item.key].group | default(item.cfg[item.alt].group) }} - - -; ############################################################ -; PHP settings -; ############################################################ -php_value[error_reporting] = {{ item.cfg[item.key].error_reporting | default(item.cfg[item.alt].error_reporting) }} -php_flag[xmlrpc_errors] = {{ item.cfg[item.key].xmlrpc_errors | default(item.cfg[item.alt].xmlrpc_errors) }} -php_flag[report_memleaks] = {{ item.cfg[item.key].report_memleaks | default(item.cfg[item.alt].report_memleaks) }} -php_flag[display_errors] = {{ item.cfg[item.key].display_errors | default(item.cfg[item.alt].display_errors) }} -php_flag[display_startup_errors] = {{ item.cfg[item.key].display_startup_errors | default(item.cfg[item.alt].display_startup_errors) }} -{# Only available before PHP 7.2 #} -{% if php_version == 5.2 or php_version == 5.3 or php_version == 5.4 or php_version == 5.5 or php_version == 5.6 or php_version == 7.0 or php_version == 7.1 %} -php_flag[track_errors] = {{ item.cfg[item.key].track_errors | default(item.cfg[item.alt].track_errors) }} -{% endif %} -php_flag[log_errors] = {{ item.cfg[item.key].log_errors | default(item.cfg[item.alt].log_errors) }} -php_flag[html_errors] = {{ item.cfg[item.key].html_errors | default(item.cfg[item.alt].html_errors) }} {% endif %} From eca4f371e316e590b20f6e43259b92ac24d8e7ad Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 2 Aug 2018 15:23:06 +0200 Subject: [PATCH 09/24] Update README --- README.md | 67 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 60 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 392d1226..128e965e 100644 --- a/README.md +++ b/README.md @@ -173,12 +173,19 @@ The following table shows a more complete overview about the offered Docker imag - base + base + devilbox/php-fpm:5.2-base + + + + + devilbox/php-fpm:5.3-base + devilbox/php-fpm:5.4-base @@ -230,7 +237,14 @@ The following table shows a more complete overview about the offered Docker imag - mods + mods + devilbox/php-fpm:5.2-mods + + + + + + devilbox/php-fpm:5.3-mods @@ -288,7 +302,14 @@ The following table shows a more complete overview about the offered Docker imag - prod + prod + devilbox/php-fpm:5.2-prod + + + + + + devilbox/php-fpm:5.3-prod @@ -346,7 +367,14 @@ The following table shows a more complete overview about the offered Docker imag - work + work + devilbox/php-fpm:5.2-work + + + + + + devilbox/php-fpm:5.3-work @@ -467,6 +495,11 @@ Check out this table to see which Docker image provides what PHP modules. + + 5.2 + ctype, curl, date, dom, filter, hash, iconv, json, libxml, mbstring, mysql, mysqli, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, posix, readline, Reflection, session, SimpleXML, soap, SPL, SQLite, standard, tokenizer, xml, xmlreader, xmlwriter, zlib + amqp, bcmath, bz2, calendar, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, igbinary, imap, interbase, intl, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, msgpack, mysql, mysqli, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, SQLite, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib + 5.3 Core, ctype, curl, date, dom, ereg, fileinfo, filter, hash, iconv, json, libxml, mysql, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, recode, Reflection, session, SimpleXML, SPL, SQLite, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib @@ -516,6 +549,7 @@ Check out this table to see which Docker image provides what PHP modules. #### Image: base ```shell +docker pull devilbox/php-fpm:5.2-base docker pull devilbox/php-fpm:5.3-base docker pull devilbox/php-fpm:5.4-base docker pull devilbox/php-fpm:5.5-base @@ -530,6 +564,7 @@ Generic PHP-FPM base image. Use it to derive your own php-fpm docker image from #### Image: mods ```shell +docker pull devilbox/php-fpm:5.2-mods docker pull devilbox/php-fpm:5.3-mods docker pull devilbox/php-fpm:5.4-mods docker pull devilbox/php-fpm:5.5-mods @@ -544,6 +579,7 @@ Generic PHP-FPM image with fully loaded extensions. Use it to derive your own ph #### Image: prod ```shell +docker pull devilbox/php-fpm:5.2-prod docker pull devilbox/php-fpm:5.3-prod docker pull devilbox/php-fpm:5.4-prod docker pull devilbox/php-fpm:5.5-prod @@ -558,6 +594,7 @@ Devilbox production image. This Docker image comes with many injectables, port-f #### Image: work ```shell +docker pull devilbox/php-fpm:5.2-work docker pull devilbox/php-fpm:5.3-work docker pull devilbox/php-fpm:5.4-work docker pull devilbox/php-fpm:5.5-work @@ -756,10 +793,10 @@ Each PHP version is using the same sane default php.ini values, making it pain-f | Flavour | Applied php.ini files| |---------|------------------------------------------| -| base | [base.ini](Dockerfiles/base/data/php.d/) | +| base | [php.ini](Dockerfiles/base/data/php-ini.d/) [php-fpm.conf](Dockerfiles/base/data/php-fpm.conf/) [php-fpm.d](Dockerfiles/base/data/php-fpm.d/) | | mods | - | -| prod | [prod.ini](Dockerfiles/prod/data/php.d/) | -| work | [work.ini](Dockerfiles/work/data/php.d/) | +| prod | - | +| work | [php.ini](Dockerfiles/work/data/php-ini.d/) [php-fpm.conf](Dockerfiles/work/data/php-fpm.conf/) [php-fpm.d](Dockerfiles/work/data/php-fpm.d/) | @@ -781,10 +818,18 @@ You want to use tools such as `git`, `drush`, `composer`, `npm`, `eslint`, `phpc Description + + Ansible + Automation tool. + awesome-ci Various linting and source code analyzing tools. + + codeception + Elegant and efficient testing for PHP. + composer Dependency Manager for PHP. @@ -825,6 +870,10 @@ You want to use tools such as `git`, `drush`, `composer`, `npm`, `eslint`, `phpc laravel installer A CLI tool to easily install and manage the laravel framework. + + linkcheck + Search for URLs in files (optionally limited by extension) and validate their HTTP status code. + linuxbrew The Homebrew package manager for Linux. @@ -873,6 +922,10 @@ You want to use tools such as `git`, `drush`, `composer`, `npm`, `eslint`, `phpc scss-lint Sass/CSS command line linter. + + ssh + OpenSSH command line client. + symfony installer This is the official installer to start new projects based on the Symfony full-stack framework. From 577a85ae9fe20f923dfa8777f6d8130c97927fd0 Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 2 Aug 2018 16:00:35 +0200 Subject: [PATCH 10/24] Remove phalcon and phpunit from PHP 5.2 --- Dockerfiles/work/Dockerfile-5.2 | 17 ----------------- build/ansible/group_vars/all.yml | 17 ++--------------- 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/Dockerfiles/work/Dockerfile-5.2 b/Dockerfiles/work/Dockerfile-5.2 index f20e88e6..b37cf14b 100644 --- a/Dockerfiles/work/Dockerfile-5.2 +++ b/Dockerfiles/work/Dockerfile-5.2 @@ -172,17 +172,6 @@ RUN set -x \ && cd / \ && rm -rf /usr/local/src/mysqldump-secure \ \ -# phalcon - && git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ -&& cd /usr/local/src/phalcon-devtools \ -&& git checkout v2.0.7 \ - \ - && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \ -&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \ -&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \ -&& cd / \ -&& rm -rf /usr/local/src/phalcon-devtools/.git \ - \ # phpcs && curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && chmod +x /usr/local/bin/phpcs \ @@ -191,10 +180,6 @@ RUN set -x \ && curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ -# phpunit - && curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \ -&& chmod +x /usr/local/bin/phpunit \ - \ # sass && gem install sass \ # webpack @@ -273,10 +258,8 @@ RUN set -x \ && linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \ && su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \ && mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \ - && phalcon commands | grep -E '[.0-9]+' \ && phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \ - && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \ && wp --allow-root --version | grep -E '[.0-9]+' \ diff --git a/build/ansible/group_vars/all.yml b/build/ansible/group_vars/all.yml index 8e9022ac..affb425f 100644 --- a/build/ansible/group_vars/all.yml +++ b/build/ansible/group_vars/all.yml @@ -525,13 +525,8 @@ software_available: && cd / \ && rm -rf /usr/local/src/mysqldump-secure \ phalcon: - disabled: [7.3] + disabled: [5.2, 7.3] check: phalcon commands | grep -E '[.0-9]+' - 5.2: - pre: | - git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ - && cd /usr/local/src/phalcon-devtools \ - && git checkout v2.0.7 \ 5.3: pre: | git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ @@ -582,11 +577,8 @@ software_available: curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ phpunit: + disabled: [5.2] check: phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' - 5.2: - command: | - curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \ - && chmod +x /usr/local/bin/phpunit \ 5.3: command: | curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \ @@ -1185,11 +1177,6 @@ extensions_available: run_dep: [libpq5] phalcon: disabled: [5.2, 7.3] - 5.2: - type: git - git_url: https://github.com/phalcon/cphalcon - git_ref: phalcon-v2.0.9 - command: cd build && ./install 5.3: type: git git_url: https://github.com/phalcon/cphalcon From cd52db50294fd07f63c30de5a613a8a1b4b72086 Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 2 Aug 2018 16:03:27 +0200 Subject: [PATCH 11/24] Remove old artifacts --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 741e5dad..f85f4a2c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -89,9 +89,6 @@ before_script: - ./build/gen-readme.sh "${PHP}" - git diff --quiet || { echo "Build Changes"; git diff; git status; false; } - # Integration tests - - true - ### ### Push to Dockerhub From b03a857a4248e33cf3c3c421994c13139ad7b95c Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 2 Aug 2018 16:08:30 +0200 Subject: [PATCH 12/24] Increase waiting time for slow machines --- tests/work/01-test-env-mysqldump-secure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/work/01-test-env-mysqldump-secure.sh b/tests/work/01-test-env-mysqldump-secure.sh index ef76aa6f..591a6c27 100755 --- a/tests/work/01-test-env-mysqldump-secure.sh +++ b/tests/work/01-test-env-mysqldump-secure.sh @@ -32,7 +32,7 @@ run "docker pull ${CONTAINER}" # Start mysql container mdid="$( docker_run "${CONTAINER}" "-e MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}" )" mname="$( docker_name "${mdid}" )" -run "sleep 5" +run "sleep 10" # Start PHP-FPM container did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -e FORWARD_PORTS_TO_LOCALHOST=3306:${mname}:3306 -e MYSQL_BACKUP_USER=root -e MYSQL_BACKUP_PASS=${MYSQL_ROOT_PASSWORD} -e MYSQL_BACKUP_HOST=127.0.0.1 -v ${MOUNTPOINT}:/shared/backups --link ${mname}" )" From 726fe86700aa61b71ad925d76bf89f91e6d9ae8e Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 2 Aug 2018 16:26:15 +0200 Subject: [PATCH 13/24] Fix PHP 5.2 Run-time errors --- Dockerfiles/base/data/php-fpm.conf/php-fpm-5.2.conf | 2 +- Dockerfiles/work/Dockerfile-5.2 | 4 ---- Dockerfiles/work/data/php-fpm.conf/php-fpm-5.2.conf | 2 +- build/ansible/CONFIGURATIONS/php-fpm.conf.j2 | 2 +- build/ansible/group_vars/all.yml | 1 + 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.2.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.2.conf index ce491243..100d142e 100644 --- a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.2.conf +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.2.conf @@ -51,7 +51,7 @@ Additional php.ini defines, specific to this pool of workers. - E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED + E_ALL Off On Off diff --git a/Dockerfiles/work/Dockerfile-5.2 b/Dockerfiles/work/Dockerfile-5.2 index b37cf14b..500dd548 100644 --- a/Dockerfiles/work/Dockerfile-5.2 +++ b/Dockerfiles/work/Dockerfile-5.2 @@ -184,9 +184,6 @@ RUN set -x \ && gem install sass \ # webpack && npm install -g webpack webpack-cli \ -# wpcli - && curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ - && chmod +x /usr/local/bin/wp \ # yamllint && apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \ && pip install yamllint \ @@ -262,7 +259,6 @@ RUN set -x \ && phpcbf --version | grep -E 'version [.0-9]+' \ && sass --version | grep -E '[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \ - && wp --allow-root --version | grep -E '[.0-9]+' \ && yamllint --version 2>&1 | grep -E '[.0-9]+' \ && true diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.2.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.2.conf index 9521473c..a4c282af 100644 --- a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.2.conf +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.2.conf @@ -51,7 +51,7 @@ Additional php.ini defines, specific to this pool of workers. - E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED + E_ALL Off On On diff --git a/build/ansible/CONFIGURATIONS/php-fpm.conf.j2 b/build/ansible/CONFIGURATIONS/php-fpm.conf.j2 index 19c3436f..ffab1748 100644 --- a/build/ansible/CONFIGURATIONS/php-fpm.conf.j2 +++ b/build/ansible/CONFIGURATIONS/php-fpm.conf.j2 @@ -57,7 +57,7 @@ include = /usr/local/etc/php-fpm.d/*.conf Additional php.ini defines, specific to this pool of workers. - {{ item.cfg[item.key].error_reporting | default(item.cfg[item.alt].error_reporting) }} + E_ALL {{ item.cfg[item.key].xmlrpc_errors | default(item.cfg[item.alt].xmlrpc_errors) }} {{ item.cfg[item.key].report_memleaks | default(item.cfg[item.alt].report_memleaks) }} {{ item.cfg[item.key].display_errors | default(item.cfg[item.alt].display_errors) }} diff --git a/build/ansible/group_vars/all.yml b/build/ansible/group_vars/all.yml index affb425f..3e73eb72 100644 --- a/build/ansible/group_vars/all.yml +++ b/build/ansible/group_vars/all.yml @@ -621,6 +621,7 @@ software_available: command: curl https://symfony.com/installer -L -o /usr/local/bin/symfony post: chmod +x /usr/local/bin/symfony wpcli: + disabled: [5.2] check: wp --allow-root --version | grep -E '[.0-9]+' all: command: curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp From fe0f94e73d1f064ca258a7b9a4ff0c22f35248d4 Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 2 Aug 2018 16:26:33 +0200 Subject: [PATCH 14/24] Add Sequential tests --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile b/Makefile index e56bd09b..f67ed6e4 100644 --- a/Makefile +++ b/Makefile @@ -338,6 +338,16 @@ pull-from-73: docker pull $(shell grep FROM $(location)/base/Dockerfile-7.3 | sed 's/^FROM//g'; done) +### +### Test all +### +test-all: test-base test-mods test-prod test-work + +test-base: test-base-52 test-base-53 test-base-54 test-base-55 test-base-56 test-base-70 test-base-71 test-base-72 test-base-73 +test-mods: test-mods-52 test-mods-53 test-mods-54 test-mods-55 test-mods-56 test-mods-70 test-mods-71 test-mods-72 test-mods-73 +test-prod: test-prod-52 test-prod-53 test-prod-54 test-prod-55 test-prod-56 test-prod-70 test-prod-71 test-prod-72 test-prod-73 +test-work: test-work-52 test-work-53 test-work-54 test-work-55 test-work-56 test-work-70 test-work-71 test-work-72 test-work-73 + ### ### Tests From cb31f9ac1f8a2461ea614f4c0bf314af1f9aaedf Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 2 Aug 2018 20:36:32 +0200 Subject: [PATCH 15/24] Extend tests --- tests/prod/02-test-env-docker_logs-stdout.sh | 167 ++++++++++++ tests/prod/02-test-env-docker_logs.sh | 117 --------- tests/prod/03-test-env-docker_logs-file.sh | 244 ++++++++++++++++++ ...ble_mail.sh => 04-test-env-enable_mail.sh} | 0 ...05-test-env-forward_ports_to_localhost.sh} | 0 ...tom_ini.sh => 06-test-mount-custom_ini.sh} | 0 ...nf.sh => 07-test-mount-custom_fpm_conf.sh} | 0 7 files changed, 411 insertions(+), 117 deletions(-) create mode 100755 tests/prod/02-test-env-docker_logs-stdout.sh delete mode 100755 tests/prod/02-test-env-docker_logs.sh create mode 100755 tests/prod/03-test-env-docker_logs-file.sh rename tests/prod/{03-test-env-enable_mail.sh => 04-test-env-enable_mail.sh} (100%) rename tests/prod/{04-test-env-forward_ports_to_localhost.sh => 05-test-env-forward_ports_to_localhost.sh} (100%) rename tests/prod/{05-test-mount-custom_ini.sh => 06-test-mount-custom_ini.sh} (100%) rename tests/prod/{06-test-mount-custom_fpm_conf.sh => 07-test-mount-custom_fpm_conf.sh} (100%) diff --git a/tests/prod/02-test-env-docker_logs-stdout.sh b/tests/prod/02-test-env-docker_logs-stdout.sh new file mode 100755 index 00000000..8f63b605 --- /dev/null +++ b/tests/prod/02-test-env-docker_logs-stdout.sh @@ -0,0 +1,167 @@ +#!/usr/bin/env bash + +set -e +set -u +set -o pipefail + +CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)" + +IMAGE="${1}" +VERSION="${2}" +FLAVOUR="${3}" + +# shellcheck disable=SC1090 +. "${CWD}/../.lib.sh" + + + +############################################################ +# Tests +############################################################ + +### +### Docker logs (STDOUT) +### +WWW_PORT="23254" +WWW_DIR_HOST="$( mktemp -d )" +WWW_DIR_CONT="/var/www/default" +CFG_DIR_HOST="$( mktemp -d )" +CFG_DIR_CONT="/etc/nginx/conf.d" +LOG_DIR_HOST="$( mktemp --directory )" +CONTAINER="nginx:stable" + +# Create www files +echo " "${WWW_DIR_HOST}/ok.php" +echo " "${WWW_DIR_HOST}/fail.php" + +# Fix mount permissions +chmod 0777 -R "${LOG_DIR_HOST}" +chmod 0777 -R "${CFG_DIR_HOST}" +chmod 0777 -R "${WWW_DIR_HOST}" + + +### +### Start container +### + +# Start PHP-FPM +did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -e DOCKER_LOGS=1 -v ${WWW_DIR_HOST}:${WWW_DIR_CONT} -v ${LOG_DIR_HOST}:/var/log/php" )" +name="$( docker_name "${did}" )" + +# Nginx.conf +{ + echo "server {" + echo " server_name _;" + echo " listen 80;" + echo " root ${WWW_DIR_CONT};" + echo " index index.php;" + echo " location ~* \.php\$ {" + echo " fastcgi_index index.php;" + echo " fastcgi_pass ${name}:9000;" + echo " include fastcgi_params;" + echo " fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;" + echo " fastcgi_param SCRIPT_NAME \$fastcgi_script_name;" + echo " }" + echo "}" +} > "${CFG_DIR_HOST}/php.conf" + + +# Start Nginx +ndid="$( docker_run "${CONTAINER}" "-v ${WWW_DIR_HOST}:${WWW_DIR_CONT} -v ${CFG_DIR_HOST}:${CFG_DIR_CONT} -p ${WWW_PORT}:80 --link ${name}" )" + +# Wait for both containers to be up and running +run "sleep 10" + + +### +### Fire positive and error generating request +### +run "curl http://localhost:${WWW_PORT}/ok.php" +run "curl http://localhost:${WWW_PORT}/fail.php" + + +### +### Run tests +### +if ! run "docker logs ${did} 2>&1 | grep -q 'DOCKER_LOGS'"; then + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 +fi + +if [ -f "${LOG_DIR_HOST}/php-fpm.access" ]; then + echo "Access log should not exist: ${LOG_DIR_HOST}/php-fpm.access" + ls -lap ${LOG_DIR_HOST}/ + cat "${LOG_DIR_HOST}/php-fpm.access" + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 +fi + +if [ -f "${LOG_DIR_HOST}/php-fpm.error" ]; then + echo "Error log should not exist: ${LOG_DIR_HOST}/php-fpm.error" + ls -lap ${LOG_DIR_HOST}/ + cat "${LOG_DIR_HOST}/php-fpm.error" + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 +fi + +if ! run "docker logs ${did} 2>&1 | grep -q 'GET /ok.php'"; then + echo "Error no access log string for 'GET /ok.php' found in stderr" + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 +fi +if ! run "docker logs ${did} 2>&1 | grep -q 'GET /fail.php'"; then + echo "Error no access log string for 'GET /fail.php' found in stderr" + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 +fi +if ! run "docker logs ${did} 2>&1 | grep -q '/var/www/default/fail.php'"; then + echo "Error no error message found in stderr" + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 +fi + + +### +### Shutdown +### +docker_stop "${ndid}" || true +docker_stop "${did}" +rm -rf "${LOG_DIR_HOST}" +rm -rf "${CFG_DIR_HOST}" +rm -rf "${WWW_DIR_HOST}" diff --git a/tests/prod/02-test-env-docker_logs.sh b/tests/prod/02-test-env-docker_logs.sh deleted file mode 100755 index 2dfbf7b5..00000000 --- a/tests/prod/02-test-env-docker_logs.sh +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -u -set -o pipefail - -CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)" - -IMAGE="${1}" -VERSION="${2}" -FLAVOUR="${3}" - -# shellcheck disable=SC1090 -. "${CWD}/../.lib.sh" - - - -############################################################ -# Tests -############################################################ - -### -### Docker logs -### -MOUNTPOINT="$( mktemp --directory )" -did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -e DOCKER_LOGS=1 -v ${MOUNTPOINT}:/var/log/php" )" -run "sleep 10" - -if ! run "docker logs ${did} 2>&1 | grep -q 'DOCKER_LOGS'"; then - docker_logs "${did}" || true - docker_stop "${did}" || true - rm -rf "${MOUNTPOINT}" - echo "Failed" - exit 1 -fi - -if [ -f "${MOUNTPOINT}/php-fpm.access" ]; then - echo "Access log should not exist: ${MOUNTPOINT}/php-fpm.access" - ls -lap ${MOUNTPOINT}/ - docker_logs "${did}" || true - docker_stop "${did}" || true - rm -rf "${MOUNTPOINT}" - echo "Failed" - exit 1 -fi -if [ -f "${MOUNTPOINT}/php-fpm.error" ]; then - echo "Error log should not exist: ${MOUNTPOINT}/php-fpm.error" - ls -lap ${MOUNTPOINT}/ - docker_logs "${did}" || true - docker_stop "${did}" || true - rm -rf "${MOUNTPOINT}" - echo "Failed" - exit 1 -fi - -run "ls -lap ${MOUNTPOINT}/" -docker_stop "${did}" -rm -rf "${MOUNTPOINT}" - - -### -### Log to file -### -MOUNTPOINT="$( mktemp --directory )" -did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -e DOCKER_LOGS=0 -v ${MOUNTPOINT}:/var/log/php" )" -run "sleep 10" - -if ! run "docker logs ${did} 2>&1 | grep -q 'DOCKER_LOGS'"; then - docker_logs "${did}" || true - docker_stop "${did}" || true - rm -rf "${MOUNTPOINT}" - echo "Failed" - exit 1 -fi - -if [ ! -f "${MOUNTPOINT}/php-fpm.access" ]; then - echo "Access log does not exist: ${MOUNTPOINT}/php-fpm.access" - ls -lap ${MOUNTPOINT}/ - docker_logs "${did}" || true - docker_stop "${did}" || true - rm -rf "${MOUNTPOINT}" - echo "Failed" - exit 1 -fi -if [ ! -r "${MOUNTPOINT}/php-fpm.access" ]; then - echo "Access log is not readable" - ls -lap ${MOUNTPOINT}/ - docker_logs "${did}" || true - docker_stop "${did}" || true - rm -rf "${MOUNTPOINT}" - echo "Failed" - exit 1 -fi - -if [ ! -f "${MOUNTPOINT}/php-fpm.error" ]; then - echo "Error log does not exist: ${MOUNTPOINT}/php-fpm.error" - ls -lap ${MOUNTPOINT}/ - docker_logs "${did}" || true - docker_stop "${did}" || true - rm -rf "${MOUNTPOINT}" - echo "Failed" - exit 1 -fi -if [ ! -r "${MOUNTPOINT}/php-fpm.error" ]; then - echo "Error log is not readable" - ls -lap ${MOUNTPOINT}/ - docker_logs "${did}" || true - docker_stop "${did}" || true - rm -rf "${MOUNTPOINT}" - echo "Failed" - exit 1 -fi - -run "ls -lap ${MOUNTPOINT}/" -run "cat ${MOUNTPOINT}/*" -docker_stop "${did}" -rm -rf "${MOUNTPOINT}" diff --git a/tests/prod/03-test-env-docker_logs-file.sh b/tests/prod/03-test-env-docker_logs-file.sh new file mode 100755 index 00000000..89fd3106 --- /dev/null +++ b/tests/prod/03-test-env-docker_logs-file.sh @@ -0,0 +1,244 @@ +#!/usr/bin/env bash + +set -e +set -u +set -o pipefail + +CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)" + +IMAGE="${1}" +VERSION="${2}" +FLAVOUR="${3}" + +# shellcheck disable=SC1090 +. "${CWD}/../.lib.sh" + + + +############################################################ +# Tests +############################################################ + +### +### Docker logs (STDOUT) +### +WWW_PORT="23254" +WWW_DIR_HOST="$( mktemp -d )" +WWW_DIR_CONT="/var/www/default" +CFG_DIR_HOST="$( mktemp -d )" +CFG_DIR_CONT="/etc/nginx/conf.d" +LOG_DIR_HOST="$( mktemp --directory )" +CONTAINER="nginx:stable" + +# Create www files +echo " "${WWW_DIR_HOST}/ok.php" +echo " "${WWW_DIR_HOST}/fail.php" + +# Fix mount permissions +chmod 0777 -R "${LOG_DIR_HOST}" +chmod 0777 -R "${CFG_DIR_HOST}" +chmod 0777 -R "${WWW_DIR_HOST}" + + +### +### Start container +### + +# Start PHP-FPM +did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -e DOCKER_LOGS=0 -v ${WWW_DIR_HOST}:${WWW_DIR_CONT} -v ${LOG_DIR_HOST}:/var/log/php" )" +name="$( docker_name "${did}" )" + +# Nginx.conf +{ + echo "server {" + echo " server_name _;" + echo " listen 80;" + echo " root ${WWW_DIR_CONT};" + echo " index index.php;" + echo " location ~* \.php\$ {" + echo " fastcgi_index index.php;" + echo " fastcgi_pass ${name}:9000;" + echo " include fastcgi_params;" + echo " fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;" + echo " fastcgi_param SCRIPT_NAME \$fastcgi_script_name;" + echo " }" + echo "}" +} > "${CFG_DIR_HOST}/php.conf" + + +# Start Nginx +ndid="$( docker_run "${CONTAINER}" "-v ${WWW_DIR_HOST}:${WWW_DIR_CONT} -v ${CFG_DIR_HOST}:${CFG_DIR_CONT} -p ${WWW_PORT}:80 --link ${name}" )" + +# Wait for both containers to be up and running +run "sleep 10" + + +### +### Fire positive and error generating request +### +run "curl http://localhost:${WWW_PORT}/ok.php" +run "curl http://localhost:${WWW_PORT}/fail.php" + + +### +### Run tests +### +if ! run "docker logs ${did} 2>&1 | grep -q 'DOCKER_LOGS'"; then + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 +fi + +if [ ! -f "${LOG_DIR_HOST}/php-fpm.access" ]; then + echo "Access log does not exist: ${LOG_DIR_HOST}/php-fpm.access" + ls -lap ${LOG_DIR_HOST}/ + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 +fi +if [ ! -r "${LOG_DIR_HOST}/php-fpm.access" ]; then + echo "Access log is not readable" + ls -lap ${LOG_DIR_HOST}/ + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 +fi + +if [ ! -f "${LOG_DIR_HOST}/php-fpm.error" ]; then + echo "Error log does not exist: ${LOG_DIR_HOST}/php-fpm.error" + ls -lap ${LOG_DIR_HOST}/ + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 +fi +if [ ! -r "${LOG_DIR_HOST}/php-fpm.error" ]; then + echo "Error log is not readable" + ls -lap ${LOG_DIR_HOST}/ + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 +fi + +# Ensure no access/error goes to stderr +if run "docker logs ${did} 2>&1 | grep -q 'GET /ok.php'"; then + echo "Error access log string for 'GET /ok.php' found in stderr, but shold go to file" + run "cat ${LOG_DIR_HOST}/php-fpm.access" + run "cat ${LOG_DIR_HOST}/php-fpm.error" + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 +fi +if run "docker logs ${did} 2>&1 | grep -q 'GET /fail.php'"; then + echo "Error access log string for 'GET /fail.php' found in stderr, but should go to file" + run "cat ${LOG_DIR_HOST}/php-fpm.access" + run "cat ${LOG_DIR_HOST}/php-fpm.error" + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 +fi +if run "docker logs ${did} 2>&1 | grep -q '/var/www/default/fail.php'"; then + echo "Error error message found in stderr, but should go to file" + run "cat ${LOG_DIR_HOST}/php-fpm.access" + run "cat ${LOG_DIR_HOST}/php-fpm.error" + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 +fi + + + + +# Test access and error file for correct content +if ! run "grep -q 'GET /ok.php' ${LOG_DIR_HOST}/php-fpm.access"; then + echo "Error no access log string for 'GET /ok.php' found in: ${LOG_DIR_HOST}/php-fpm.access" + run "cat ${LOG_DIR_HOST}/php-fpm.access" + run "cat ${LOG_DIR_HOST}/php-fpm.error" + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 +fi +if ! run "grep -q 'GET /fail.php' ${LOG_DIR_HOST}/php-fpm.access"; then + echo "Error no access log string for 'GET /fail.php' found in: ${LOG_DIR_HOST}/php-fpm.access" + run "cat ${LOG_DIR_HOST}/php-fpm.access" + run "cat ${LOG_DIR_HOST}/php-fpm.error" + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 +fi +if ! run "grep -q '/var/www/default/fail.php' ${LOG_DIR_HOST}/php-fpm.error"; then + echo "Error no error message found in: ${LOG_DIR_HOST}/php-fpm.error" + run "cat ${LOG_DIR_HOST}/php-fpm.access" + run "cat ${LOG_DIR_HOST}/php-fpm.error" + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 +fi + + +### +### Shutdown +### +docker_logs "${did}" || true +run "ls -lap ${LOG_DIR_HOST}/" +run "cat ${LOG_DIR_HOST}/php-fpm.access" +run "cat ${LOG_DIR_HOST}/php-fpm.error" +docker_stop "${ndid}" || true +docker_stop "${did}" +rm -rf "${LOG_DIR_HOST}" +rm -rf "${CFG_DIR_HOST}" +rm -rf "${WWW_DIR_HOST}" diff --git a/tests/prod/03-test-env-enable_mail.sh b/tests/prod/04-test-env-enable_mail.sh similarity index 100% rename from tests/prod/03-test-env-enable_mail.sh rename to tests/prod/04-test-env-enable_mail.sh diff --git a/tests/prod/04-test-env-forward_ports_to_localhost.sh b/tests/prod/05-test-env-forward_ports_to_localhost.sh similarity index 100% rename from tests/prod/04-test-env-forward_ports_to_localhost.sh rename to tests/prod/05-test-env-forward_ports_to_localhost.sh diff --git a/tests/prod/05-test-mount-custom_ini.sh b/tests/prod/06-test-mount-custom_ini.sh similarity index 100% rename from tests/prod/05-test-mount-custom_ini.sh rename to tests/prod/06-test-mount-custom_ini.sh diff --git a/tests/prod/06-test-mount-custom_fpm_conf.sh b/tests/prod/07-test-mount-custom_fpm_conf.sh similarity index 100% rename from tests/prod/06-test-mount-custom_fpm_conf.sh rename to tests/prod/07-test-mount-custom_fpm_conf.sh From cb176f5ebae6911fea7d11b0b7bdf8d660ada120 Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 2 Aug 2018 20:37:08 +0200 Subject: [PATCH 16/24] Harden PHP-FPM defaults --- Dockerfiles/base/Dockerfile-5.2 | 1 - Dockerfiles/base/Dockerfile-5.3 | 1 - Dockerfiles/base/Dockerfile-5.4 | 1 - Dockerfiles/base/Dockerfile-5.5 | 1 - Dockerfiles/base/Dockerfile-5.6 | 1 - Dockerfiles/base/Dockerfile-7.0 | 1 - Dockerfiles/base/Dockerfile-7.1 | 1 - Dockerfiles/base/Dockerfile-7.2 | 1 - Dockerfiles/base/Dockerfile-7.3 | 1 - .../base/data/php-fpm.conf/php-fpm-5.2.conf | 20 +-- .../base/data/php-fpm.conf/php-fpm-5.3.conf | 118 ++++++++++++++- .../base/data/php-fpm.conf/php-fpm-5.4.conf | 120 +++++++++++++++- .../base/data/php-fpm.conf/php-fpm-5.5.conf | 120 +++++++++++++++- .../base/data/php-fpm.conf/php-fpm-5.6.conf | 120 +++++++++++++++- .../base/data/php-fpm.conf/php-fpm-7.0.conf | 120 +++++++++++++++- .../base/data/php-fpm.conf/php-fpm-7.1.conf | 120 +++++++++++++++- .../base/data/php-fpm.conf/php-fpm-7.2.conf | 120 +++++++++++++++- .../base/data/php-fpm.conf/php-fpm-7.3.conf | 120 +++++++++++++++- .../base/data/php-fpm.d/php-fpm.d-5.2.conf | 1 - .../base/data/php-fpm.d/php-fpm.d-5.3.conf | 85 ----------- .../base/data/php-fpm.d/php-fpm.d-5.4.conf | 87 ------------ .../base/data/php-fpm.d/php-fpm.d-5.5.conf | 87 ------------ .../base/data/php-fpm.d/php-fpm.d-5.6.conf | 87 ------------ .../base/data/php-fpm.d/php-fpm.d-7.0.conf | 87 ------------ .../base/data/php-fpm.d/php-fpm.d-7.1.conf | 87 ------------ .../base/data/php-fpm.d/php-fpm.d-7.2.conf | 87 ------------ .../base/data/php-fpm.d/php-fpm.d-7.3.conf | 87 ------------ Dockerfiles/base/data/php-ini.d/php-5.2.ini | 8 +- Dockerfiles/base/data/php-ini.d/php-5.3.ini | 8 +- Dockerfiles/base/data/php-ini.d/php-5.4.ini | 8 +- Dockerfiles/base/data/php-ini.d/php-5.5.ini | 8 +- Dockerfiles/base/data/php-ini.d/php-5.6.ini | 8 +- Dockerfiles/base/data/php-ini.d/php-7.0.ini | 8 +- Dockerfiles/base/data/php-ini.d/php-7.1.ini | 8 +- Dockerfiles/base/data/php-ini.d/php-7.2.ini | 8 +- Dockerfiles/base/data/php-ini.d/php-7.3.ini | 8 +- Dockerfiles/work/Dockerfile-5.2 | 1 - Dockerfiles/work/Dockerfile-5.3 | 1 - Dockerfiles/work/Dockerfile-5.4 | 1 - Dockerfiles/work/Dockerfile-5.5 | 1 - Dockerfiles/work/Dockerfile-5.6 | 1 - Dockerfiles/work/Dockerfile-7.0 | 1 - Dockerfiles/work/Dockerfile-7.1 | 1 - Dockerfiles/work/Dockerfile-7.2 | 1 - Dockerfiles/work/Dockerfile-7.3 | 1 - .../work/data/php-fpm.conf/php-fpm-5.2.conf | 20 +-- .../work/data/php-fpm.conf/php-fpm-5.3.conf | 118 ++++++++++++++- .../work/data/php-fpm.conf/php-fpm-5.4.conf | 120 +++++++++++++++- .../work/data/php-fpm.conf/php-fpm-5.5.conf | 120 +++++++++++++++- .../work/data/php-fpm.conf/php-fpm-5.6.conf | 120 +++++++++++++++- .../work/data/php-fpm.conf/php-fpm-7.0.conf | 120 +++++++++++++++- .../work/data/php-fpm.conf/php-fpm-7.1.conf | 120 +++++++++++++++- .../work/data/php-fpm.conf/php-fpm-7.2.conf | 120 +++++++++++++++- .../work/data/php-fpm.conf/php-fpm-7.3.conf | 120 +++++++++++++++- .../work/data/php-fpm.d/php-fpm.d-5.2.conf | 1 - .../work/data/php-fpm.d/php-fpm.d-5.3.conf | 85 ----------- .../work/data/php-fpm.d/php-fpm.d-5.4.conf | 87 ------------ .../work/data/php-fpm.d/php-fpm.d-5.5.conf | 87 ------------ .../work/data/php-fpm.d/php-fpm.d-5.6.conf | 87 ------------ .../work/data/php-fpm.d/php-fpm.d-7.0.conf | 87 ------------ .../work/data/php-fpm.d/php-fpm.d-7.1.conf | 87 ------------ .../work/data/php-fpm.d/php-fpm.d-7.2.conf | 87 ------------ .../work/data/php-fpm.d/php-fpm.d-7.3.conf | 87 ------------ Dockerfiles/work/data/php-ini.d/php-5.2.ini | 8 +- Dockerfiles/work/data/php-ini.d/php-5.3.ini | 8 +- Dockerfiles/work/data/php-ini.d/php-5.4.ini | 8 +- Dockerfiles/work/data/php-ini.d/php-5.5.ini | 8 +- Dockerfiles/work/data/php-ini.d/php-5.6.ini | 8 +- Dockerfiles/work/data/php-ini.d/php-7.0.ini | 8 +- Dockerfiles/work/data/php-ini.d/php-7.1.ini | 8 +- Dockerfiles/work/data/php-ini.d/php-7.2.ini | 8 +- Dockerfiles/work/data/php-ini.d/php-7.3.ini | 8 +- build/ansible/CONFIGURATIONS/php-fpm.conf.j2 | 134 ++++++++++++++++-- .../ansible/CONFIGURATIONS/php-fpm.d-conf.j2 | 94 ------------ build/ansible/DOCKERFILES/Dockerfile-base.j2 | 1 - build/ansible/DOCKERFILES/Dockerfile-work.j2 | 1 - build/ansible/group_vars/all.yml | 119 +++++----------- 77 files changed, 2137 insertions(+), 1720 deletions(-) delete mode 100644 Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.2.conf delete mode 100644 Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.3.conf delete mode 100644 Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.4.conf delete mode 100644 Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.5.conf delete mode 100644 Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.6.conf delete mode 100644 Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.0.conf delete mode 100644 Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.1.conf delete mode 100644 Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.2.conf delete mode 100644 Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.3.conf delete mode 100644 Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.2.conf delete mode 100644 Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.3.conf delete mode 100644 Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.4.conf delete mode 100644 Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.5.conf delete mode 100644 Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.6.conf delete mode 100644 Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.0.conf delete mode 100644 Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.1.conf delete mode 100644 Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.2.conf delete mode 100644 Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.3.conf delete mode 100644 build/ansible/CONFIGURATIONS/php-fpm.d-conf.j2 diff --git a/Dockerfiles/base/Dockerfile-5.2 b/Dockerfiles/base/Dockerfile-5.2 index c8100f97..ce1a4758 100644 --- a/Dockerfiles/base/Dockerfile-5.2 +++ b/Dockerfiles/base/Dockerfile-5.2 @@ -59,7 +59,6 @@ RUN set -x \ ### COPY ./data/php-ini.d/php-5.2.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini COPY ./data/php-fpm.conf/php-fpm-5.2.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d/php-fpm.d-5.2.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d /docker-entrypoint.d diff --git a/Dockerfiles/base/Dockerfile-5.3 b/Dockerfiles/base/Dockerfile-5.3 index 4fcec30d..8c8c31fb 100644 --- a/Dockerfiles/base/Dockerfile-5.3 +++ b/Dockerfiles/base/Dockerfile-5.3 @@ -59,7 +59,6 @@ RUN set -x \ ### COPY ./data/php-ini.d/php-5.3.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini COPY ./data/php-fpm.conf/php-fpm-5.3.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d/php-fpm.d-5.3.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d /docker-entrypoint.d diff --git a/Dockerfiles/base/Dockerfile-5.4 b/Dockerfiles/base/Dockerfile-5.4 index 10c22cd1..275baa9d 100644 --- a/Dockerfiles/base/Dockerfile-5.4 +++ b/Dockerfiles/base/Dockerfile-5.4 @@ -59,7 +59,6 @@ RUN set -x \ ### COPY ./data/php-ini.d/php-5.4.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini COPY ./data/php-fpm.conf/php-fpm-5.4.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d/php-fpm.d-5.4.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d /docker-entrypoint.d diff --git a/Dockerfiles/base/Dockerfile-5.5 b/Dockerfiles/base/Dockerfile-5.5 index a9adadeb..bac875ad 100644 --- a/Dockerfiles/base/Dockerfile-5.5 +++ b/Dockerfiles/base/Dockerfile-5.5 @@ -59,7 +59,6 @@ RUN set -x \ ### COPY ./data/php-ini.d/php-5.5.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini COPY ./data/php-fpm.conf/php-fpm-5.5.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d/php-fpm.d-5.5.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d /docker-entrypoint.d diff --git a/Dockerfiles/base/Dockerfile-5.6 b/Dockerfiles/base/Dockerfile-5.6 index b15a4e9b..8f6d41d1 100644 --- a/Dockerfiles/base/Dockerfile-5.6 +++ b/Dockerfiles/base/Dockerfile-5.6 @@ -59,7 +59,6 @@ RUN set -x \ ### COPY ./data/php-ini.d/php-5.6.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini COPY ./data/php-fpm.conf/php-fpm-5.6.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d/php-fpm.d-5.6.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d /docker-entrypoint.d diff --git a/Dockerfiles/base/Dockerfile-7.0 b/Dockerfiles/base/Dockerfile-7.0 index 314be179..0b897ca6 100644 --- a/Dockerfiles/base/Dockerfile-7.0 +++ b/Dockerfiles/base/Dockerfile-7.0 @@ -59,7 +59,6 @@ RUN set -x \ ### COPY ./data/php-ini.d/php-7.0.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini COPY ./data/php-fpm.conf/php-fpm-7.0.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d/php-fpm.d-7.0.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d /docker-entrypoint.d diff --git a/Dockerfiles/base/Dockerfile-7.1 b/Dockerfiles/base/Dockerfile-7.1 index 92f9912f..6882cb64 100644 --- a/Dockerfiles/base/Dockerfile-7.1 +++ b/Dockerfiles/base/Dockerfile-7.1 @@ -59,7 +59,6 @@ RUN set -x \ ### COPY ./data/php-ini.d/php-7.1.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini COPY ./data/php-fpm.conf/php-fpm-7.1.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d/php-fpm.d-7.1.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d /docker-entrypoint.d diff --git a/Dockerfiles/base/Dockerfile-7.2 b/Dockerfiles/base/Dockerfile-7.2 index d8df1b9e..373dc28e 100644 --- a/Dockerfiles/base/Dockerfile-7.2 +++ b/Dockerfiles/base/Dockerfile-7.2 @@ -59,7 +59,6 @@ RUN set -x \ ### COPY ./data/php-ini.d/php-7.2.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini COPY ./data/php-fpm.conf/php-fpm-7.2.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d/php-fpm.d-7.2.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d /docker-entrypoint.d diff --git a/Dockerfiles/base/Dockerfile-7.3 b/Dockerfiles/base/Dockerfile-7.3 index 361644b3..732ef3d7 100644 --- a/Dockerfiles/base/Dockerfile-7.3 +++ b/Dockerfiles/base/Dockerfile-7.3 @@ -59,7 +59,6 @@ RUN set -x \ ### COPY ./data/php-ini.d/php-7.3.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini COPY ./data/php-fpm.conf/php-fpm-7.3.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d/php-fpm.d-7.3.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d /docker-entrypoint.d diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.2.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.2.conf index 100d142e..b84509e4 100644 --- a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.2.conf +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.2.conf @@ -40,7 +40,7 @@ Set listen(2) backlog - 1023 + 1024 Set permissions for unix socket, if one used. In Linux read/write permissions must be set in order to allow connections from web server. Many BSD-derrived systems allow connections regardless of permissions. @@ -50,16 +50,6 @@ Additional php.ini defines, specific to this pool of workers. - - E_ALL - Off - On - Off - Off - On - On - Off - Unix user of processes devilbox @@ -84,15 +74,15 @@ Sets the number of server processes created on startup. Used only when 'apache-like' pm_style is selected - 10 + 4 Sets the desired minimum number of idle server processes. Used only when 'apache-like' pm_style is selected - 5 + 2 Sets the desired maximum number of idle server processes. Used only when 'apache-like' pm_style is selected - 15 + 6 @@ -100,7 +90,7 @@ The timeout (in seconds) for serving a single request after which the worker process will be terminated Should be used when 'max_execution_time' ini option does not stop script execution for some reason '0s' means 'off' - 180s + 120s The timeout (in seconds) for serving of single request after which a php backtrace will be dumped to slow.log file '0s' means 'off' diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.3.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.3.conf index 370fe706..3ddf1d8d 100644 --- a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.3.conf +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.3.conf @@ -1,3 +1,119 @@ +; ################################################################################ +; #### +; #### The following settings can be overwritten by later includes +; #### +; ################################################################################ + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 120s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] + +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = 10s + + +; ############################################################ +; Include +; ############################################################ + + [global] -daemonize = no include = /usr/local/etc/php-fpm.d/*.conf + + +; ################################################################################ +; #### +; #### The following settings overwrite any includes again +; #### +; ################################################################################ + + +; ############################################################ +; Required for Dockerization +; ############################################################ + +[global] +daemonize = no + +[www] + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1024 diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.4.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.4.conf index 370fe706..1d63a44e 100644 --- a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.4.conf +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.4.conf @@ -1,3 +1,121 @@ +; ################################################################################ +; #### +; #### The following settings can be overwritten by later includes +; #### +; ################################################################################ + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 120s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] + +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = 10s + + +; ############################################################ +; Include +; ############################################################ + + [global] -daemonize = no include = /usr/local/etc/php-fpm.d/*.conf + + +; ################################################################################ +; #### +; #### The following settings overwrite any includes again +; #### +; ################################################################################ + + +; ############################################################ +; Required for Dockerization +; ############################################################ + +[global] +daemonize = no + +[www] +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1024 diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.5.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.5.conf index 370fe706..1d63a44e 100644 --- a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.5.conf +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.5.conf @@ -1,3 +1,121 @@ +; ################################################################################ +; #### +; #### The following settings can be overwritten by later includes +; #### +; ################################################################################ + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 120s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] + +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = 10s + + +; ############################################################ +; Include +; ############################################################ + + [global] -daemonize = no include = /usr/local/etc/php-fpm.d/*.conf + + +; ################################################################################ +; #### +; #### The following settings overwrite any includes again +; #### +; ################################################################################ + + +; ############################################################ +; Required for Dockerization +; ############################################################ + +[global] +daemonize = no + +[www] +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1024 diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.6.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.6.conf index 370fe706..1d63a44e 100644 --- a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.6.conf +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.6.conf @@ -1,3 +1,121 @@ +; ################################################################################ +; #### +; #### The following settings can be overwritten by later includes +; #### +; ################################################################################ + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 120s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] + +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = 10s + + +; ############################################################ +; Include +; ############################################################ + + [global] -daemonize = no include = /usr/local/etc/php-fpm.d/*.conf + + +; ################################################################################ +; #### +; #### The following settings overwrite any includes again +; #### +; ################################################################################ + + +; ############################################################ +; Required for Dockerization +; ############################################################ + +[global] +daemonize = no + +[www] +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1024 diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.0.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.0.conf index 370fe706..1d63a44e 100644 --- a/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.0.conf +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.0.conf @@ -1,3 +1,121 @@ +; ################################################################################ +; #### +; #### The following settings can be overwritten by later includes +; #### +; ################################################################################ + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 120s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] + +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = 10s + + +; ############################################################ +; Include +; ############################################################ + + [global] -daemonize = no include = /usr/local/etc/php-fpm.d/*.conf + + +; ################################################################################ +; #### +; #### The following settings overwrite any includes again +; #### +; ################################################################################ + + +; ############################################################ +; Required for Dockerization +; ############################################################ + +[global] +daemonize = no + +[www] +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1024 diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.1.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.1.conf index 370fe706..1d63a44e 100644 --- a/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.1.conf +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.1.conf @@ -1,3 +1,121 @@ +; ################################################################################ +; #### +; #### The following settings can be overwritten by later includes +; #### +; ################################################################################ + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 120s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] + +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = 10s + + +; ############################################################ +; Include +; ############################################################ + + [global] -daemonize = no include = /usr/local/etc/php-fpm.d/*.conf + + +; ################################################################################ +; #### +; #### The following settings overwrite any includes again +; #### +; ################################################################################ + + +; ############################################################ +; Required for Dockerization +; ############################################################ + +[global] +daemonize = no + +[www] +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1024 diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.2.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.2.conf index 370fe706..1d63a44e 100644 --- a/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.2.conf +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.2.conf @@ -1,3 +1,121 @@ +; ################################################################################ +; #### +; #### The following settings can be overwritten by later includes +; #### +; ################################################################################ + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 120s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] + +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = 10s + + +; ############################################################ +; Include +; ############################################################ + + [global] -daemonize = no include = /usr/local/etc/php-fpm.d/*.conf + + +; ################################################################################ +; #### +; #### The following settings overwrite any includes again +; #### +; ################################################################################ + + +; ############################################################ +; Required for Dockerization +; ############################################################ + +[global] +daemonize = no + +[www] +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1024 diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.3.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.3.conf index 370fe706..1d63a44e 100644 --- a/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.3.conf +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.3.conf @@ -1,3 +1,121 @@ +; ################################################################################ +; #### +; #### The following settings can be overwritten by later includes +; #### +; ################################################################################ + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 120s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] + +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = 10s + + +; ############################################################ +; Include +; ############################################################ + + [global] -daemonize = no include = /usr/local/etc/php-fpm.d/*.conf + + +; ################################################################################ +; #### +; #### The following settings overwrite any includes again +; #### +; ################################################################################ + + +; ############################################################ +; Required for Dockerization +; ############################################################ + +[global] +daemonize = no + +[www] +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1024 diff --git a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.2.conf b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.2.conf deleted file mode 100644 index 8b137891..00000000 --- a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.2.conf +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.3.conf b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.3.conf deleted file mode 100644 index 3d947a95..00000000 --- a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.3.conf +++ /dev/null @@ -1,85 +0,0 @@ -[www] - -; ############################################################ -; Required for Dockerization -; ############################################################ - - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -catch_workers_output = yes - - -; ############################################################ -; Networking -; ############################################################ - -[www] -; Ensure to listen here -listen = 9000 -listen.backlog = 1023 - - -; ############################################################ -; Timeouts -; ############################################################ - -[www] -; The timeout for serving a single request after which the worker process will be killed. -; This option should be used when the 'max_execution_time' ini option does not stop script -; execution for some reason. -request_terminate_timeout = 180s - - -; ############################################################ -; Logging -; ############################################################ - -[global] -error_log = /proc/self/fd/2 -log_level = notice - -[www] -; if we send this to /proc/self/fd/1, it never appears -access.log = /proc/self/fd/2 - - -; ############################################################ -; Worker configuration -; ############################################################ - -[www] -; The number of child processes is set dynamically based on the following directives: -; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. -pm = dynamic - -; The maximum number of child processes to be created -pm.max_children = 50 - -; The number of child processes created on startup. Used only when pm is set to dynamic. -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. -pm.start_servers = 10 - -; The desired minimum number of idle server processes. -pm.min_spare_servers = 5 - -; The desired maximum number of idle server processes. -pm.max_spare_servers = 15 - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. -; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default value: 0. -pm.max_requests = 500 - - -; ############################################################ -; User and Group -; ############################################################ - -[www] -user = devilbox -group = devilbox diff --git a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.4.conf b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.4.conf deleted file mode 100644 index af26d252..00000000 --- a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.4.conf +++ /dev/null @@ -1,87 +0,0 @@ -[www] - -; ############################################################ -; Required for Dockerization -; ############################################################ - -; Keep env variables set by docker -clear_env = no - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -catch_workers_output = yes - - -; ############################################################ -; Networking -; ############################################################ - -[www] -; Ensure to listen here -listen = 9000 -listen.backlog = 1023 - - -; ############################################################ -; Timeouts -; ############################################################ - -[www] -; The timeout for serving a single request after which the worker process will be killed. -; This option should be used when the 'max_execution_time' ini option does not stop script -; execution for some reason. -request_terminate_timeout = 180s - - -; ############################################################ -; Logging -; ############################################################ - -[global] -error_log = /proc/self/fd/2 -log_level = notice - -[www] -; if we send this to /proc/self/fd/1, it never appears -access.log = /proc/self/fd/2 - - -; ############################################################ -; Worker configuration -; ############################################################ - -[www] -; The number of child processes is set dynamically based on the following directives: -; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. -pm = dynamic - -; The maximum number of child processes to be created -pm.max_children = 50 - -; The number of child processes created on startup. Used only when pm is set to dynamic. -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. -pm.start_servers = 10 - -; The desired minimum number of idle server processes. -pm.min_spare_servers = 5 - -; The desired maximum number of idle server processes. -pm.max_spare_servers = 15 - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. -; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default value: 0. -pm.max_requests = 500 - - -; ############################################################ -; User and Group -; ############################################################ - -[www] -user = devilbox -group = devilbox diff --git a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.5.conf b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.5.conf deleted file mode 100644 index af26d252..00000000 --- a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.5.conf +++ /dev/null @@ -1,87 +0,0 @@ -[www] - -; ############################################################ -; Required for Dockerization -; ############################################################ - -; Keep env variables set by docker -clear_env = no - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -catch_workers_output = yes - - -; ############################################################ -; Networking -; ############################################################ - -[www] -; Ensure to listen here -listen = 9000 -listen.backlog = 1023 - - -; ############################################################ -; Timeouts -; ############################################################ - -[www] -; The timeout for serving a single request after which the worker process will be killed. -; This option should be used when the 'max_execution_time' ini option does not stop script -; execution for some reason. -request_terminate_timeout = 180s - - -; ############################################################ -; Logging -; ############################################################ - -[global] -error_log = /proc/self/fd/2 -log_level = notice - -[www] -; if we send this to /proc/self/fd/1, it never appears -access.log = /proc/self/fd/2 - - -; ############################################################ -; Worker configuration -; ############################################################ - -[www] -; The number of child processes is set dynamically based on the following directives: -; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. -pm = dynamic - -; The maximum number of child processes to be created -pm.max_children = 50 - -; The number of child processes created on startup. Used only when pm is set to dynamic. -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. -pm.start_servers = 10 - -; The desired minimum number of idle server processes. -pm.min_spare_servers = 5 - -; The desired maximum number of idle server processes. -pm.max_spare_servers = 15 - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. -; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default value: 0. -pm.max_requests = 500 - - -; ############################################################ -; User and Group -; ############################################################ - -[www] -user = devilbox -group = devilbox diff --git a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.6.conf b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.6.conf deleted file mode 100644 index af26d252..00000000 --- a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-5.6.conf +++ /dev/null @@ -1,87 +0,0 @@ -[www] - -; ############################################################ -; Required for Dockerization -; ############################################################ - -; Keep env variables set by docker -clear_env = no - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -catch_workers_output = yes - - -; ############################################################ -; Networking -; ############################################################ - -[www] -; Ensure to listen here -listen = 9000 -listen.backlog = 1023 - - -; ############################################################ -; Timeouts -; ############################################################ - -[www] -; The timeout for serving a single request after which the worker process will be killed. -; This option should be used when the 'max_execution_time' ini option does not stop script -; execution for some reason. -request_terminate_timeout = 180s - - -; ############################################################ -; Logging -; ############################################################ - -[global] -error_log = /proc/self/fd/2 -log_level = notice - -[www] -; if we send this to /proc/self/fd/1, it never appears -access.log = /proc/self/fd/2 - - -; ############################################################ -; Worker configuration -; ############################################################ - -[www] -; The number of child processes is set dynamically based on the following directives: -; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. -pm = dynamic - -; The maximum number of child processes to be created -pm.max_children = 50 - -; The number of child processes created on startup. Used only when pm is set to dynamic. -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. -pm.start_servers = 10 - -; The desired minimum number of idle server processes. -pm.min_spare_servers = 5 - -; The desired maximum number of idle server processes. -pm.max_spare_servers = 15 - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. -; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default value: 0. -pm.max_requests = 500 - - -; ############################################################ -; User and Group -; ############################################################ - -[www] -user = devilbox -group = devilbox diff --git a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.0.conf b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.0.conf deleted file mode 100644 index af26d252..00000000 --- a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.0.conf +++ /dev/null @@ -1,87 +0,0 @@ -[www] - -; ############################################################ -; Required for Dockerization -; ############################################################ - -; Keep env variables set by docker -clear_env = no - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -catch_workers_output = yes - - -; ############################################################ -; Networking -; ############################################################ - -[www] -; Ensure to listen here -listen = 9000 -listen.backlog = 1023 - - -; ############################################################ -; Timeouts -; ############################################################ - -[www] -; The timeout for serving a single request after which the worker process will be killed. -; This option should be used when the 'max_execution_time' ini option does not stop script -; execution for some reason. -request_terminate_timeout = 180s - - -; ############################################################ -; Logging -; ############################################################ - -[global] -error_log = /proc/self/fd/2 -log_level = notice - -[www] -; if we send this to /proc/self/fd/1, it never appears -access.log = /proc/self/fd/2 - - -; ############################################################ -; Worker configuration -; ############################################################ - -[www] -; The number of child processes is set dynamically based on the following directives: -; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. -pm = dynamic - -; The maximum number of child processes to be created -pm.max_children = 50 - -; The number of child processes created on startup. Used only when pm is set to dynamic. -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. -pm.start_servers = 10 - -; The desired minimum number of idle server processes. -pm.min_spare_servers = 5 - -; The desired maximum number of idle server processes. -pm.max_spare_servers = 15 - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. -; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default value: 0. -pm.max_requests = 500 - - -; ############################################################ -; User and Group -; ############################################################ - -[www] -user = devilbox -group = devilbox diff --git a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.1.conf b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.1.conf deleted file mode 100644 index af26d252..00000000 --- a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.1.conf +++ /dev/null @@ -1,87 +0,0 @@ -[www] - -; ############################################################ -; Required for Dockerization -; ############################################################ - -; Keep env variables set by docker -clear_env = no - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -catch_workers_output = yes - - -; ############################################################ -; Networking -; ############################################################ - -[www] -; Ensure to listen here -listen = 9000 -listen.backlog = 1023 - - -; ############################################################ -; Timeouts -; ############################################################ - -[www] -; The timeout for serving a single request after which the worker process will be killed. -; This option should be used when the 'max_execution_time' ini option does not stop script -; execution for some reason. -request_terminate_timeout = 180s - - -; ############################################################ -; Logging -; ############################################################ - -[global] -error_log = /proc/self/fd/2 -log_level = notice - -[www] -; if we send this to /proc/self/fd/1, it never appears -access.log = /proc/self/fd/2 - - -; ############################################################ -; Worker configuration -; ############################################################ - -[www] -; The number of child processes is set dynamically based on the following directives: -; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. -pm = dynamic - -; The maximum number of child processes to be created -pm.max_children = 50 - -; The number of child processes created on startup. Used only when pm is set to dynamic. -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. -pm.start_servers = 10 - -; The desired minimum number of idle server processes. -pm.min_spare_servers = 5 - -; The desired maximum number of idle server processes. -pm.max_spare_servers = 15 - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. -; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default value: 0. -pm.max_requests = 500 - - -; ############################################################ -; User and Group -; ############################################################ - -[www] -user = devilbox -group = devilbox diff --git a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.2.conf b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.2.conf deleted file mode 100644 index af26d252..00000000 --- a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.2.conf +++ /dev/null @@ -1,87 +0,0 @@ -[www] - -; ############################################################ -; Required for Dockerization -; ############################################################ - -; Keep env variables set by docker -clear_env = no - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -catch_workers_output = yes - - -; ############################################################ -; Networking -; ############################################################ - -[www] -; Ensure to listen here -listen = 9000 -listen.backlog = 1023 - - -; ############################################################ -; Timeouts -; ############################################################ - -[www] -; The timeout for serving a single request after which the worker process will be killed. -; This option should be used when the 'max_execution_time' ini option does not stop script -; execution for some reason. -request_terminate_timeout = 180s - - -; ############################################################ -; Logging -; ############################################################ - -[global] -error_log = /proc/self/fd/2 -log_level = notice - -[www] -; if we send this to /proc/self/fd/1, it never appears -access.log = /proc/self/fd/2 - - -; ############################################################ -; Worker configuration -; ############################################################ - -[www] -; The number of child processes is set dynamically based on the following directives: -; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. -pm = dynamic - -; The maximum number of child processes to be created -pm.max_children = 50 - -; The number of child processes created on startup. Used only when pm is set to dynamic. -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. -pm.start_servers = 10 - -; The desired minimum number of idle server processes. -pm.min_spare_servers = 5 - -; The desired maximum number of idle server processes. -pm.max_spare_servers = 15 - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. -; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default value: 0. -pm.max_requests = 500 - - -; ############################################################ -; User and Group -; ############################################################ - -[www] -user = devilbox -group = devilbox diff --git a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.3.conf b/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.3.conf deleted file mode 100644 index af26d252..00000000 --- a/Dockerfiles/base/data/php-fpm.d/php-fpm.d-7.3.conf +++ /dev/null @@ -1,87 +0,0 @@ -[www] - -; ############################################################ -; Required for Dockerization -; ############################################################ - -; Keep env variables set by docker -clear_env = no - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -catch_workers_output = yes - - -; ############################################################ -; Networking -; ############################################################ - -[www] -; Ensure to listen here -listen = 9000 -listen.backlog = 1023 - - -; ############################################################ -; Timeouts -; ############################################################ - -[www] -; The timeout for serving a single request after which the worker process will be killed. -; This option should be used when the 'max_execution_time' ini option does not stop script -; execution for some reason. -request_terminate_timeout = 180s - - -; ############################################################ -; Logging -; ############################################################ - -[global] -error_log = /proc/self/fd/2 -log_level = notice - -[www] -; if we send this to /proc/self/fd/1, it never appears -access.log = /proc/self/fd/2 - - -; ############################################################ -; Worker configuration -; ############################################################ - -[www] -; The number of child processes is set dynamically based on the following directives: -; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. -pm = dynamic - -; The maximum number of child processes to be created -pm.max_children = 50 - -; The number of child processes created on startup. Used only when pm is set to dynamic. -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. -pm.start_servers = 10 - -; The desired minimum number of idle server processes. -pm.min_spare_servers = 5 - -; The desired maximum number of idle server processes. -pm.max_spare_servers = 15 - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. -; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default value: 0. -pm.max_requests = 500 - - -; ############################################################ -; User and Group -; ############################################################ - -[www] -user = devilbox -group = devilbox diff --git a/Dockerfiles/base/data/php-ini.d/php-5.2.ini b/Dockerfiles/base/data/php-ini.d/php-5.2.ini index 80dce909..2f614cd6 100644 --- a/Dockerfiles/base/data/php-ini.d/php-5.2.ini +++ b/Dockerfiles/base/data/php-ini.d/php-5.2.ini @@ -14,14 +14,14 @@ memory_limit = 512M ; Timeouts -max_execution_time = 180 -max_input_time = 180 +max_execution_time = 120 +max_input_time = 120 ; Uploads ; Note: "post_max_size" should be greater than "upload_max_filesize" -post_max_size = 384M -upload_max_filesize = 256M +post_max_size = 72M +upload_max_filesize = 64M max_file_uploads = 20 diff --git a/Dockerfiles/base/data/php-ini.d/php-5.3.ini b/Dockerfiles/base/data/php-ini.d/php-5.3.ini index 1ad9bc61..966ee72f 100644 --- a/Dockerfiles/base/data/php-ini.d/php-5.3.ini +++ b/Dockerfiles/base/data/php-ini.d/php-5.3.ini @@ -14,14 +14,14 @@ memory_limit = 512M ; Timeouts -max_execution_time = 180 -max_input_time = 180 +max_execution_time = 120 +max_input_time = 120 ; Uploads ; Note: "post_max_size" should be greater than "upload_max_filesize" -post_max_size = 384M -upload_max_filesize = 256M +post_max_size = 72M +upload_max_filesize = 64M max_file_uploads = 20 diff --git a/Dockerfiles/base/data/php-ini.d/php-5.4.ini b/Dockerfiles/base/data/php-ini.d/php-5.4.ini index 936d1df4..dfb4d3be 100644 --- a/Dockerfiles/base/data/php-ini.d/php-5.4.ini +++ b/Dockerfiles/base/data/php-ini.d/php-5.4.ini @@ -14,14 +14,14 @@ memory_limit = 512M ; Timeouts -max_execution_time = 180 -max_input_time = 180 +max_execution_time = 120 +max_input_time = 120 ; Uploads ; Note: "post_max_size" should be greater than "upload_max_filesize" -post_max_size = 384M -upload_max_filesize = 256M +post_max_size = 72M +upload_max_filesize = 64M max_file_uploads = 20 diff --git a/Dockerfiles/base/data/php-ini.d/php-5.5.ini b/Dockerfiles/base/data/php-ini.d/php-5.5.ini index 6b9ef0ec..36845043 100644 --- a/Dockerfiles/base/data/php-ini.d/php-5.5.ini +++ b/Dockerfiles/base/data/php-ini.d/php-5.5.ini @@ -14,14 +14,14 @@ memory_limit = 512M ; Timeouts -max_execution_time = 180 -max_input_time = 180 +max_execution_time = 120 +max_input_time = 120 ; Uploads ; Note: "post_max_size" should be greater than "upload_max_filesize" -post_max_size = 384M -upload_max_filesize = 256M +post_max_size = 72M +upload_max_filesize = 64M max_file_uploads = 20 diff --git a/Dockerfiles/base/data/php-ini.d/php-5.6.ini b/Dockerfiles/base/data/php-ini.d/php-5.6.ini index ba2a39e8..07845869 100644 --- a/Dockerfiles/base/data/php-ini.d/php-5.6.ini +++ b/Dockerfiles/base/data/php-ini.d/php-5.6.ini @@ -14,14 +14,14 @@ memory_limit = 512M ; Timeouts -max_execution_time = 180 -max_input_time = 180 +max_execution_time = 120 +max_input_time = 120 ; Uploads ; Note: "post_max_size" should be greater than "upload_max_filesize" -post_max_size = 384M -upload_max_filesize = 256M +post_max_size = 72M +upload_max_filesize = 64M max_file_uploads = 20 diff --git a/Dockerfiles/base/data/php-ini.d/php-7.0.ini b/Dockerfiles/base/data/php-ini.d/php-7.0.ini index a5ae47a4..29e7b109 100644 --- a/Dockerfiles/base/data/php-ini.d/php-7.0.ini +++ b/Dockerfiles/base/data/php-ini.d/php-7.0.ini @@ -14,14 +14,14 @@ memory_limit = 512M ; Timeouts -max_execution_time = 180 -max_input_time = 180 +max_execution_time = 120 +max_input_time = 120 ; Uploads ; Note: "post_max_size" should be greater than "upload_max_filesize" -post_max_size = 384M -upload_max_filesize = 256M +post_max_size = 72M +upload_max_filesize = 64M max_file_uploads = 20 diff --git a/Dockerfiles/base/data/php-ini.d/php-7.1.ini b/Dockerfiles/base/data/php-ini.d/php-7.1.ini index 68e58321..8aea9f87 100644 --- a/Dockerfiles/base/data/php-ini.d/php-7.1.ini +++ b/Dockerfiles/base/data/php-ini.d/php-7.1.ini @@ -14,14 +14,14 @@ memory_limit = 512M ; Timeouts -max_execution_time = 180 -max_input_time = 180 +max_execution_time = 120 +max_input_time = 120 ; Uploads ; Note: "post_max_size" should be greater than "upload_max_filesize" -post_max_size = 384M -upload_max_filesize = 256M +post_max_size = 72M +upload_max_filesize = 64M max_file_uploads = 20 diff --git a/Dockerfiles/base/data/php-ini.d/php-7.2.ini b/Dockerfiles/base/data/php-ini.d/php-7.2.ini index 1c41a924..00291793 100644 --- a/Dockerfiles/base/data/php-ini.d/php-7.2.ini +++ b/Dockerfiles/base/data/php-ini.d/php-7.2.ini @@ -14,14 +14,14 @@ memory_limit = 512M ; Timeouts -max_execution_time = 180 -max_input_time = 180 +max_execution_time = 120 +max_input_time = 120 ; Uploads ; Note: "post_max_size" should be greater than "upload_max_filesize" -post_max_size = 384M -upload_max_filesize = 256M +post_max_size = 72M +upload_max_filesize = 64M max_file_uploads = 20 diff --git a/Dockerfiles/base/data/php-ini.d/php-7.3.ini b/Dockerfiles/base/data/php-ini.d/php-7.3.ini index db61d268..bac8bfeb 100644 --- a/Dockerfiles/base/data/php-ini.d/php-7.3.ini +++ b/Dockerfiles/base/data/php-ini.d/php-7.3.ini @@ -14,14 +14,14 @@ memory_limit = 512M ; Timeouts -max_execution_time = 180 -max_input_time = 180 +max_execution_time = 120 +max_input_time = 120 ; Uploads ; Note: "post_max_size" should be greater than "upload_max_filesize" -post_max_size = 384M -upload_max_filesize = 256M +post_max_size = 72M +upload_max_filesize = 64M max_file_uploads = 20 diff --git a/Dockerfiles/work/Dockerfile-5.2 b/Dockerfiles/work/Dockerfile-5.2 index 500dd548..56b6502b 100644 --- a/Dockerfiles/work/Dockerfile-5.2 +++ b/Dockerfiles/work/Dockerfile-5.2 @@ -268,7 +268,6 @@ RUN set -x \ ### COPY ./data/php-ini.d/php-5.2.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini COPY ./data/php-fpm.conf/php-fpm-5.2.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d/php-fpm.d-5.2.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ diff --git a/Dockerfiles/work/Dockerfile-5.3 b/Dockerfiles/work/Dockerfile-5.3 index 210dca5c..2983b276 100644 --- a/Dockerfiles/work/Dockerfile-5.3 +++ b/Dockerfiles/work/Dockerfile-5.3 @@ -312,7 +312,6 @@ RUN set -x \ ### COPY ./data/php-ini.d/php-5.3.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini COPY ./data/php-fpm.conf/php-fpm-5.3.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d/php-fpm.d-5.3.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ diff --git a/Dockerfiles/work/Dockerfile-5.4 b/Dockerfiles/work/Dockerfile-5.4 index b9fdc9b7..004ca98c 100644 --- a/Dockerfiles/work/Dockerfile-5.4 +++ b/Dockerfiles/work/Dockerfile-5.4 @@ -327,7 +327,6 @@ RUN set -x \ ### COPY ./data/php-ini.d/php-5.4.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini COPY ./data/php-fpm.conf/php-fpm-5.4.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d/php-fpm.d-5.4.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ diff --git a/Dockerfiles/work/Dockerfile-5.5 b/Dockerfiles/work/Dockerfile-5.5 index 2332ec92..e47eba3a 100644 --- a/Dockerfiles/work/Dockerfile-5.5 +++ b/Dockerfiles/work/Dockerfile-5.5 @@ -336,7 +336,6 @@ RUN set -x \ ### COPY ./data/php-ini.d/php-5.5.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini COPY ./data/php-fpm.conf/php-fpm-5.5.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d/php-fpm.d-5.5.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ diff --git a/Dockerfiles/work/Dockerfile-5.6 b/Dockerfiles/work/Dockerfile-5.6 index ba335387..4c7fdb9f 100644 --- a/Dockerfiles/work/Dockerfile-5.6 +++ b/Dockerfiles/work/Dockerfile-5.6 @@ -336,7 +336,6 @@ RUN set -x \ ### COPY ./data/php-ini.d/php-5.6.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini COPY ./data/php-fpm.conf/php-fpm-5.6.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d/php-fpm.d-5.6.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ diff --git a/Dockerfiles/work/Dockerfile-7.0 b/Dockerfiles/work/Dockerfile-7.0 index 88e825b0..611869a1 100644 --- a/Dockerfiles/work/Dockerfile-7.0 +++ b/Dockerfiles/work/Dockerfile-7.0 @@ -336,7 +336,6 @@ RUN set -x \ ### COPY ./data/php-ini.d/php-7.0.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini COPY ./data/php-fpm.conf/php-fpm-7.0.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d/php-fpm.d-7.0.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ diff --git a/Dockerfiles/work/Dockerfile-7.1 b/Dockerfiles/work/Dockerfile-7.1 index 3914d4be..94d56a41 100644 --- a/Dockerfiles/work/Dockerfile-7.1 +++ b/Dockerfiles/work/Dockerfile-7.1 @@ -336,7 +336,6 @@ RUN set -x \ ### COPY ./data/php-ini.d/php-7.1.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini COPY ./data/php-fpm.conf/php-fpm-7.1.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d/php-fpm.d-7.1.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ diff --git a/Dockerfiles/work/Dockerfile-7.2 b/Dockerfiles/work/Dockerfile-7.2 index e26e4ba8..cedb7e20 100644 --- a/Dockerfiles/work/Dockerfile-7.2 +++ b/Dockerfiles/work/Dockerfile-7.2 @@ -336,7 +336,6 @@ RUN set -x \ ### COPY ./data/php-ini.d/php-7.2.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini COPY ./data/php-fpm.conf/php-fpm-7.2.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d/php-fpm.d-7.2.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ diff --git a/Dockerfiles/work/Dockerfile-7.3 b/Dockerfiles/work/Dockerfile-7.3 index 9713a1a4..492c3b76 100644 --- a/Dockerfiles/work/Dockerfile-7.3 +++ b/Dockerfiles/work/Dockerfile-7.3 @@ -324,7 +324,6 @@ RUN set -x \ ### COPY ./data/php-ini.d/php-7.3.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini COPY ./data/php-fpm.conf/php-fpm-7.3.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d/php-fpm.d-7.3.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.2.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.2.conf index a4c282af..b84509e4 100644 --- a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.2.conf +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.2.conf @@ -40,7 +40,7 @@ Set listen(2) backlog - 1023 + 1024 Set permissions for unix socket, if one used. In Linux read/write permissions must be set in order to allow connections from web server. Many BSD-derrived systems allow connections regardless of permissions. @@ -50,16 +50,6 @@ Additional php.ini defines, specific to this pool of workers. - - E_ALL - Off - On - On - On - On - On - On - Unix user of processes devilbox @@ -84,15 +74,15 @@ Sets the number of server processes created on startup. Used only when 'apache-like' pm_style is selected - 10 + 4 Sets the desired minimum number of idle server processes. Used only when 'apache-like' pm_style is selected - 5 + 2 Sets the desired maximum number of idle server processes. Used only when 'apache-like' pm_style is selected - 15 + 6 @@ -100,7 +90,7 @@ The timeout (in seconds) for serving a single request after which the worker process will be terminated Should be used when 'max_execution_time' ini option does not stop script execution for some reason '0s' means 'off' - 180s + 120s The timeout (in seconds) for serving of single request after which a php backtrace will be dumped to slow.log file '0s' means 'off' diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.3.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.3.conf index 370fe706..3ddf1d8d 100644 --- a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.3.conf +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.3.conf @@ -1,3 +1,119 @@ +; ################################################################################ +; #### +; #### The following settings can be overwritten by later includes +; #### +; ################################################################################ + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 120s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] + +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = 10s + + +; ############################################################ +; Include +; ############################################################ + + [global] -daemonize = no include = /usr/local/etc/php-fpm.d/*.conf + + +; ################################################################################ +; #### +; #### The following settings overwrite any includes again +; #### +; ################################################################################ + + +; ############################################################ +; Required for Dockerization +; ############################################################ + +[global] +daemonize = no + +[www] + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1024 diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.4.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.4.conf index 370fe706..1d63a44e 100644 --- a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.4.conf +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.4.conf @@ -1,3 +1,121 @@ +; ################################################################################ +; #### +; #### The following settings can be overwritten by later includes +; #### +; ################################################################################ + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 120s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] + +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = 10s + + +; ############################################################ +; Include +; ############################################################ + + [global] -daemonize = no include = /usr/local/etc/php-fpm.d/*.conf + + +; ################################################################################ +; #### +; #### The following settings overwrite any includes again +; #### +; ################################################################################ + + +; ############################################################ +; Required for Dockerization +; ############################################################ + +[global] +daemonize = no + +[www] +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1024 diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.5.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.5.conf index 370fe706..1d63a44e 100644 --- a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.5.conf +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.5.conf @@ -1,3 +1,121 @@ +; ################################################################################ +; #### +; #### The following settings can be overwritten by later includes +; #### +; ################################################################################ + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 120s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] + +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = 10s + + +; ############################################################ +; Include +; ############################################################ + + [global] -daemonize = no include = /usr/local/etc/php-fpm.d/*.conf + + +; ################################################################################ +; #### +; #### The following settings overwrite any includes again +; #### +; ################################################################################ + + +; ############################################################ +; Required for Dockerization +; ############################################################ + +[global] +daemonize = no + +[www] +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1024 diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.6.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.6.conf index 370fe706..1d63a44e 100644 --- a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.6.conf +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.6.conf @@ -1,3 +1,121 @@ +; ################################################################################ +; #### +; #### The following settings can be overwritten by later includes +; #### +; ################################################################################ + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 120s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] + +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = 10s + + +; ############################################################ +; Include +; ############################################################ + + [global] -daemonize = no include = /usr/local/etc/php-fpm.d/*.conf + + +; ################################################################################ +; #### +; #### The following settings overwrite any includes again +; #### +; ################################################################################ + + +; ############################################################ +; Required for Dockerization +; ############################################################ + +[global] +daemonize = no + +[www] +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1024 diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.0.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.0.conf index 370fe706..1d63a44e 100644 --- a/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.0.conf +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.0.conf @@ -1,3 +1,121 @@ +; ################################################################################ +; #### +; #### The following settings can be overwritten by later includes +; #### +; ################################################################################ + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 120s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] + +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = 10s + + +; ############################################################ +; Include +; ############################################################ + + [global] -daemonize = no include = /usr/local/etc/php-fpm.d/*.conf + + +; ################################################################################ +; #### +; #### The following settings overwrite any includes again +; #### +; ################################################################################ + + +; ############################################################ +; Required for Dockerization +; ############################################################ + +[global] +daemonize = no + +[www] +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1024 diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.1.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.1.conf index 370fe706..1d63a44e 100644 --- a/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.1.conf +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.1.conf @@ -1,3 +1,121 @@ +; ################################################################################ +; #### +; #### The following settings can be overwritten by later includes +; #### +; ################################################################################ + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 120s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] + +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = 10s + + +; ############################################################ +; Include +; ############################################################ + + [global] -daemonize = no include = /usr/local/etc/php-fpm.d/*.conf + + +; ################################################################################ +; #### +; #### The following settings overwrite any includes again +; #### +; ################################################################################ + + +; ############################################################ +; Required for Dockerization +; ############################################################ + +[global] +daemonize = no + +[www] +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1024 diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.2.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.2.conf index 370fe706..1d63a44e 100644 --- a/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.2.conf +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.2.conf @@ -1,3 +1,121 @@ +; ################################################################################ +; #### +; #### The following settings can be overwritten by later includes +; #### +; ################################################################################ + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 120s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] + +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = 10s + + +; ############################################################ +; Include +; ############################################################ + + [global] -daemonize = no include = /usr/local/etc/php-fpm.d/*.conf + + +; ################################################################################ +; #### +; #### The following settings overwrite any includes again +; #### +; ################################################################################ + + +; ############################################################ +; Required for Dockerization +; ############################################################ + +[global] +daemonize = no + +[www] +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1024 diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.3.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.3.conf index 370fe706..1d63a44e 100644 --- a/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.3.conf +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.3.conf @@ -1,3 +1,121 @@ +; ################################################################################ +; #### +; #### The following settings can be overwritten by later includes +; #### +; ################################################################################ + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 120s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] + +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = 10s + + +; ############################################################ +; Include +; ############################################################ + + [global] -daemonize = no include = /usr/local/etc/php-fpm.d/*.conf + + +; ################################################################################ +; #### +; #### The following settings overwrite any includes again +; #### +; ################################################################################ + + +; ############################################################ +; Required for Dockerization +; ############################################################ + +[global] +daemonize = no + +[www] +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 +listen.backlog = 1024 diff --git a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.2.conf b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.2.conf deleted file mode 100644 index 8b137891..00000000 --- a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.2.conf +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.3.conf b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.3.conf deleted file mode 100644 index 3d947a95..00000000 --- a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.3.conf +++ /dev/null @@ -1,85 +0,0 @@ -[www] - -; ############################################################ -; Required for Dockerization -; ############################################################ - - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -catch_workers_output = yes - - -; ############################################################ -; Networking -; ############################################################ - -[www] -; Ensure to listen here -listen = 9000 -listen.backlog = 1023 - - -; ############################################################ -; Timeouts -; ############################################################ - -[www] -; The timeout for serving a single request after which the worker process will be killed. -; This option should be used when the 'max_execution_time' ini option does not stop script -; execution for some reason. -request_terminate_timeout = 180s - - -; ############################################################ -; Logging -; ############################################################ - -[global] -error_log = /proc/self/fd/2 -log_level = notice - -[www] -; if we send this to /proc/self/fd/1, it never appears -access.log = /proc/self/fd/2 - - -; ############################################################ -; Worker configuration -; ############################################################ - -[www] -; The number of child processes is set dynamically based on the following directives: -; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. -pm = dynamic - -; The maximum number of child processes to be created -pm.max_children = 50 - -; The number of child processes created on startup. Used only when pm is set to dynamic. -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. -pm.start_servers = 10 - -; The desired minimum number of idle server processes. -pm.min_spare_servers = 5 - -; The desired maximum number of idle server processes. -pm.max_spare_servers = 15 - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. -; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default value: 0. -pm.max_requests = 500 - - -; ############################################################ -; User and Group -; ############################################################ - -[www] -user = devilbox -group = devilbox diff --git a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.4.conf b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.4.conf deleted file mode 100644 index af26d252..00000000 --- a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.4.conf +++ /dev/null @@ -1,87 +0,0 @@ -[www] - -; ############################################################ -; Required for Dockerization -; ############################################################ - -; Keep env variables set by docker -clear_env = no - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -catch_workers_output = yes - - -; ############################################################ -; Networking -; ############################################################ - -[www] -; Ensure to listen here -listen = 9000 -listen.backlog = 1023 - - -; ############################################################ -; Timeouts -; ############################################################ - -[www] -; The timeout for serving a single request after which the worker process will be killed. -; This option should be used when the 'max_execution_time' ini option does not stop script -; execution for some reason. -request_terminate_timeout = 180s - - -; ############################################################ -; Logging -; ############################################################ - -[global] -error_log = /proc/self/fd/2 -log_level = notice - -[www] -; if we send this to /proc/self/fd/1, it never appears -access.log = /proc/self/fd/2 - - -; ############################################################ -; Worker configuration -; ############################################################ - -[www] -; The number of child processes is set dynamically based on the following directives: -; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. -pm = dynamic - -; The maximum number of child processes to be created -pm.max_children = 50 - -; The number of child processes created on startup. Used only when pm is set to dynamic. -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. -pm.start_servers = 10 - -; The desired minimum number of idle server processes. -pm.min_spare_servers = 5 - -; The desired maximum number of idle server processes. -pm.max_spare_servers = 15 - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. -; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default value: 0. -pm.max_requests = 500 - - -; ############################################################ -; User and Group -; ############################################################ - -[www] -user = devilbox -group = devilbox diff --git a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.5.conf b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.5.conf deleted file mode 100644 index af26d252..00000000 --- a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.5.conf +++ /dev/null @@ -1,87 +0,0 @@ -[www] - -; ############################################################ -; Required for Dockerization -; ############################################################ - -; Keep env variables set by docker -clear_env = no - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -catch_workers_output = yes - - -; ############################################################ -; Networking -; ############################################################ - -[www] -; Ensure to listen here -listen = 9000 -listen.backlog = 1023 - - -; ############################################################ -; Timeouts -; ############################################################ - -[www] -; The timeout for serving a single request after which the worker process will be killed. -; This option should be used when the 'max_execution_time' ini option does not stop script -; execution for some reason. -request_terminate_timeout = 180s - - -; ############################################################ -; Logging -; ############################################################ - -[global] -error_log = /proc/self/fd/2 -log_level = notice - -[www] -; if we send this to /proc/self/fd/1, it never appears -access.log = /proc/self/fd/2 - - -; ############################################################ -; Worker configuration -; ############################################################ - -[www] -; The number of child processes is set dynamically based on the following directives: -; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. -pm = dynamic - -; The maximum number of child processes to be created -pm.max_children = 50 - -; The number of child processes created on startup. Used only when pm is set to dynamic. -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. -pm.start_servers = 10 - -; The desired minimum number of idle server processes. -pm.min_spare_servers = 5 - -; The desired maximum number of idle server processes. -pm.max_spare_servers = 15 - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. -; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default value: 0. -pm.max_requests = 500 - - -; ############################################################ -; User and Group -; ############################################################ - -[www] -user = devilbox -group = devilbox diff --git a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.6.conf b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.6.conf deleted file mode 100644 index af26d252..00000000 --- a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-5.6.conf +++ /dev/null @@ -1,87 +0,0 @@ -[www] - -; ############################################################ -; Required for Dockerization -; ############################################################ - -; Keep env variables set by docker -clear_env = no - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -catch_workers_output = yes - - -; ############################################################ -; Networking -; ############################################################ - -[www] -; Ensure to listen here -listen = 9000 -listen.backlog = 1023 - - -; ############################################################ -; Timeouts -; ############################################################ - -[www] -; The timeout for serving a single request after which the worker process will be killed. -; This option should be used when the 'max_execution_time' ini option does not stop script -; execution for some reason. -request_terminate_timeout = 180s - - -; ############################################################ -; Logging -; ############################################################ - -[global] -error_log = /proc/self/fd/2 -log_level = notice - -[www] -; if we send this to /proc/self/fd/1, it never appears -access.log = /proc/self/fd/2 - - -; ############################################################ -; Worker configuration -; ############################################################ - -[www] -; The number of child processes is set dynamically based on the following directives: -; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. -pm = dynamic - -; The maximum number of child processes to be created -pm.max_children = 50 - -; The number of child processes created on startup. Used only when pm is set to dynamic. -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. -pm.start_servers = 10 - -; The desired minimum number of idle server processes. -pm.min_spare_servers = 5 - -; The desired maximum number of idle server processes. -pm.max_spare_servers = 15 - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. -; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default value: 0. -pm.max_requests = 500 - - -; ############################################################ -; User and Group -; ############################################################ - -[www] -user = devilbox -group = devilbox diff --git a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.0.conf b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.0.conf deleted file mode 100644 index af26d252..00000000 --- a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.0.conf +++ /dev/null @@ -1,87 +0,0 @@ -[www] - -; ############################################################ -; Required for Dockerization -; ############################################################ - -; Keep env variables set by docker -clear_env = no - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -catch_workers_output = yes - - -; ############################################################ -; Networking -; ############################################################ - -[www] -; Ensure to listen here -listen = 9000 -listen.backlog = 1023 - - -; ############################################################ -; Timeouts -; ############################################################ - -[www] -; The timeout for serving a single request after which the worker process will be killed. -; This option should be used when the 'max_execution_time' ini option does not stop script -; execution for some reason. -request_terminate_timeout = 180s - - -; ############################################################ -; Logging -; ############################################################ - -[global] -error_log = /proc/self/fd/2 -log_level = notice - -[www] -; if we send this to /proc/self/fd/1, it never appears -access.log = /proc/self/fd/2 - - -; ############################################################ -; Worker configuration -; ############################################################ - -[www] -; The number of child processes is set dynamically based on the following directives: -; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. -pm = dynamic - -; The maximum number of child processes to be created -pm.max_children = 50 - -; The number of child processes created on startup. Used only when pm is set to dynamic. -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. -pm.start_servers = 10 - -; The desired minimum number of idle server processes. -pm.min_spare_servers = 5 - -; The desired maximum number of idle server processes. -pm.max_spare_servers = 15 - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. -; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default value: 0. -pm.max_requests = 500 - - -; ############################################################ -; User and Group -; ############################################################ - -[www] -user = devilbox -group = devilbox diff --git a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.1.conf b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.1.conf deleted file mode 100644 index af26d252..00000000 --- a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.1.conf +++ /dev/null @@ -1,87 +0,0 @@ -[www] - -; ############################################################ -; Required for Dockerization -; ############################################################ - -; Keep env variables set by docker -clear_env = no - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -catch_workers_output = yes - - -; ############################################################ -; Networking -; ############################################################ - -[www] -; Ensure to listen here -listen = 9000 -listen.backlog = 1023 - - -; ############################################################ -; Timeouts -; ############################################################ - -[www] -; The timeout for serving a single request after which the worker process will be killed. -; This option should be used when the 'max_execution_time' ini option does not stop script -; execution for some reason. -request_terminate_timeout = 180s - - -; ############################################################ -; Logging -; ############################################################ - -[global] -error_log = /proc/self/fd/2 -log_level = notice - -[www] -; if we send this to /proc/self/fd/1, it never appears -access.log = /proc/self/fd/2 - - -; ############################################################ -; Worker configuration -; ############################################################ - -[www] -; The number of child processes is set dynamically based on the following directives: -; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. -pm = dynamic - -; The maximum number of child processes to be created -pm.max_children = 50 - -; The number of child processes created on startup. Used only when pm is set to dynamic. -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. -pm.start_servers = 10 - -; The desired minimum number of idle server processes. -pm.min_spare_servers = 5 - -; The desired maximum number of idle server processes. -pm.max_spare_servers = 15 - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. -; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default value: 0. -pm.max_requests = 500 - - -; ############################################################ -; User and Group -; ############################################################ - -[www] -user = devilbox -group = devilbox diff --git a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.2.conf b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.2.conf deleted file mode 100644 index af26d252..00000000 --- a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.2.conf +++ /dev/null @@ -1,87 +0,0 @@ -[www] - -; ############################################################ -; Required for Dockerization -; ############################################################ - -; Keep env variables set by docker -clear_env = no - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -catch_workers_output = yes - - -; ############################################################ -; Networking -; ############################################################ - -[www] -; Ensure to listen here -listen = 9000 -listen.backlog = 1023 - - -; ############################################################ -; Timeouts -; ############################################################ - -[www] -; The timeout for serving a single request after which the worker process will be killed. -; This option should be used when the 'max_execution_time' ini option does not stop script -; execution for some reason. -request_terminate_timeout = 180s - - -; ############################################################ -; Logging -; ############################################################ - -[global] -error_log = /proc/self/fd/2 -log_level = notice - -[www] -; if we send this to /proc/self/fd/1, it never appears -access.log = /proc/self/fd/2 - - -; ############################################################ -; Worker configuration -; ############################################################ - -[www] -; The number of child processes is set dynamically based on the following directives: -; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. -pm = dynamic - -; The maximum number of child processes to be created -pm.max_children = 50 - -; The number of child processes created on startup. Used only when pm is set to dynamic. -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. -pm.start_servers = 10 - -; The desired minimum number of idle server processes. -pm.min_spare_servers = 5 - -; The desired maximum number of idle server processes. -pm.max_spare_servers = 15 - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. -; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default value: 0. -pm.max_requests = 500 - - -; ############################################################ -; User and Group -; ############################################################ - -[www] -user = devilbox -group = devilbox diff --git a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.3.conf b/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.3.conf deleted file mode 100644 index af26d252..00000000 --- a/Dockerfiles/work/data/php-fpm.d/php-fpm.d-7.3.conf +++ /dev/null @@ -1,87 +0,0 @@ -[www] - -; ############################################################ -; Required for Dockerization -; ############################################################ - -; Keep env variables set by docker -clear_env = no - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -catch_workers_output = yes - - -; ############################################################ -; Networking -; ############################################################ - -[www] -; Ensure to listen here -listen = 9000 -listen.backlog = 1023 - - -; ############################################################ -; Timeouts -; ############################################################ - -[www] -; The timeout for serving a single request after which the worker process will be killed. -; This option should be used when the 'max_execution_time' ini option does not stop script -; execution for some reason. -request_terminate_timeout = 180s - - -; ############################################################ -; Logging -; ############################################################ - -[global] -error_log = /proc/self/fd/2 -log_level = notice - -[www] -; if we send this to /proc/self/fd/1, it never appears -access.log = /proc/self/fd/2 - - -; ############################################################ -; Worker configuration -; ############################################################ - -[www] -; The number of child processes is set dynamically based on the following directives: -; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. -pm = dynamic - -; The maximum number of child processes to be created -pm.max_children = 50 - -; The number of child processes created on startup. Used only when pm is set to dynamic. -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. -pm.start_servers = 10 - -; The desired minimum number of idle server processes. -pm.min_spare_servers = 5 - -; The desired maximum number of idle server processes. -pm.max_spare_servers = 15 - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. -; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default value: 0. -pm.max_requests = 500 - - -; ############################################################ -; User and Group -; ############################################################ - -[www] -user = devilbox -group = devilbox diff --git a/Dockerfiles/work/data/php-ini.d/php-5.2.ini b/Dockerfiles/work/data/php-ini.d/php-5.2.ini index e58a7517..3cb919ad 100644 --- a/Dockerfiles/work/data/php-ini.d/php-5.2.ini +++ b/Dockerfiles/work/data/php-ini.d/php-5.2.ini @@ -14,14 +14,14 @@ memory_limit = 512M ; Timeouts -max_execution_time = 180 -max_input_time = 180 +max_execution_time = 120 +max_input_time = 120 ; Uploads ; Note: "post_max_size" should be greater than "upload_max_filesize" -post_max_size = 384M -upload_max_filesize = 256M +post_max_size = 72M +upload_max_filesize = 64M max_file_uploads = 20 diff --git a/Dockerfiles/work/data/php-ini.d/php-5.3.ini b/Dockerfiles/work/data/php-ini.d/php-5.3.ini index 42bf4740..911194bb 100644 --- a/Dockerfiles/work/data/php-ini.d/php-5.3.ini +++ b/Dockerfiles/work/data/php-ini.d/php-5.3.ini @@ -14,14 +14,14 @@ memory_limit = 512M ; Timeouts -max_execution_time = 180 -max_input_time = 180 +max_execution_time = 120 +max_input_time = 120 ; Uploads ; Note: "post_max_size" should be greater than "upload_max_filesize" -post_max_size = 384M -upload_max_filesize = 256M +post_max_size = 72M +upload_max_filesize = 64M max_file_uploads = 20 diff --git a/Dockerfiles/work/data/php-ini.d/php-5.4.ini b/Dockerfiles/work/data/php-ini.d/php-5.4.ini index 80249001..30c1a650 100644 --- a/Dockerfiles/work/data/php-ini.d/php-5.4.ini +++ b/Dockerfiles/work/data/php-ini.d/php-5.4.ini @@ -14,14 +14,14 @@ memory_limit = 512M ; Timeouts -max_execution_time = 180 -max_input_time = 180 +max_execution_time = 120 +max_input_time = 120 ; Uploads ; Note: "post_max_size" should be greater than "upload_max_filesize" -post_max_size = 384M -upload_max_filesize = 256M +post_max_size = 72M +upload_max_filesize = 64M max_file_uploads = 20 diff --git a/Dockerfiles/work/data/php-ini.d/php-5.5.ini b/Dockerfiles/work/data/php-ini.d/php-5.5.ini index d1e947c6..08f7133d 100644 --- a/Dockerfiles/work/data/php-ini.d/php-5.5.ini +++ b/Dockerfiles/work/data/php-ini.d/php-5.5.ini @@ -14,14 +14,14 @@ memory_limit = 512M ; Timeouts -max_execution_time = 180 -max_input_time = 180 +max_execution_time = 120 +max_input_time = 120 ; Uploads ; Note: "post_max_size" should be greater than "upload_max_filesize" -post_max_size = 384M -upload_max_filesize = 256M +post_max_size = 72M +upload_max_filesize = 64M max_file_uploads = 20 diff --git a/Dockerfiles/work/data/php-ini.d/php-5.6.ini b/Dockerfiles/work/data/php-ini.d/php-5.6.ini index 85867c70..ec0f14d7 100644 --- a/Dockerfiles/work/data/php-ini.d/php-5.6.ini +++ b/Dockerfiles/work/data/php-ini.d/php-5.6.ini @@ -14,14 +14,14 @@ memory_limit = 512M ; Timeouts -max_execution_time = 180 -max_input_time = 180 +max_execution_time = 120 +max_input_time = 120 ; Uploads ; Note: "post_max_size" should be greater than "upload_max_filesize" -post_max_size = 384M -upload_max_filesize = 256M +post_max_size = 72M +upload_max_filesize = 64M max_file_uploads = 20 diff --git a/Dockerfiles/work/data/php-ini.d/php-7.0.ini b/Dockerfiles/work/data/php-ini.d/php-7.0.ini index bb0da45c..0d048f8b 100644 --- a/Dockerfiles/work/data/php-ini.d/php-7.0.ini +++ b/Dockerfiles/work/data/php-ini.d/php-7.0.ini @@ -14,14 +14,14 @@ memory_limit = 512M ; Timeouts -max_execution_time = 180 -max_input_time = 180 +max_execution_time = 120 +max_input_time = 120 ; Uploads ; Note: "post_max_size" should be greater than "upload_max_filesize" -post_max_size = 384M -upload_max_filesize = 256M +post_max_size = 72M +upload_max_filesize = 64M max_file_uploads = 20 diff --git a/Dockerfiles/work/data/php-ini.d/php-7.1.ini b/Dockerfiles/work/data/php-ini.d/php-7.1.ini index 89816be0..e11e06a1 100644 --- a/Dockerfiles/work/data/php-ini.d/php-7.1.ini +++ b/Dockerfiles/work/data/php-ini.d/php-7.1.ini @@ -14,14 +14,14 @@ memory_limit = 512M ; Timeouts -max_execution_time = 180 -max_input_time = 180 +max_execution_time = 120 +max_input_time = 120 ; Uploads ; Note: "post_max_size" should be greater than "upload_max_filesize" -post_max_size = 384M -upload_max_filesize = 256M +post_max_size = 72M +upload_max_filesize = 64M max_file_uploads = 20 diff --git a/Dockerfiles/work/data/php-ini.d/php-7.2.ini b/Dockerfiles/work/data/php-ini.d/php-7.2.ini index cd9da8d7..d94ce6ea 100644 --- a/Dockerfiles/work/data/php-ini.d/php-7.2.ini +++ b/Dockerfiles/work/data/php-ini.d/php-7.2.ini @@ -14,14 +14,14 @@ memory_limit = 512M ; Timeouts -max_execution_time = 180 -max_input_time = 180 +max_execution_time = 120 +max_input_time = 120 ; Uploads ; Note: "post_max_size" should be greater than "upload_max_filesize" -post_max_size = 384M -upload_max_filesize = 256M +post_max_size = 72M +upload_max_filesize = 64M max_file_uploads = 20 diff --git a/Dockerfiles/work/data/php-ini.d/php-7.3.ini b/Dockerfiles/work/data/php-ini.d/php-7.3.ini index 3888e66b..ce0d34f4 100644 --- a/Dockerfiles/work/data/php-ini.d/php-7.3.ini +++ b/Dockerfiles/work/data/php-ini.d/php-7.3.ini @@ -14,14 +14,14 @@ memory_limit = 512M ; Timeouts -max_execution_time = 180 -max_input_time = 180 +max_execution_time = 120 +max_input_time = 120 ; Uploads ; Note: "post_max_size" should be greater than "upload_max_filesize" -post_max_size = 384M -upload_max_filesize = 256M +post_max_size = 72M +upload_max_filesize = 64M max_file_uploads = 20 diff --git a/build/ansible/CONFIGURATIONS/php-fpm.conf.j2 b/build/ansible/CONFIGURATIONS/php-fpm.conf.j2 index ffab1748..7bacedec 100644 --- a/build/ansible/CONFIGURATIONS/php-fpm.conf.j2 +++ b/build/ansible/CONFIGURATIONS/php-fpm.conf.j2 @@ -1,7 +1,129 @@ {% if not php_version == 5.2 %} +; ################################################################################ +; #### +; #### The following settings can be overwritten by later includes +; #### +; ################################################################################ + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = {{ item.cfg[item.key].request_terminate_timeout | default(item.cfg[item.alt].request_terminate_timeout) }} + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = {{ item.cfg[item.key].error_log | default(item.cfg[item.alt].error_log) }} +log_level = {{ item.cfg[item.key].log_level | default(item.cfg[item.alt].log_level) }} + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = {{ item.cfg[item.key].access_log | default(item.cfg[item.alt].access_log) }} + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] + +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = {{ item.cfg[item.key].pm | default(item.cfg[item.alt].pm) }} + +; The maximum number of child processes to be created +pm.max_children = {{ item.cfg[item.key].pm_max_children | default(item.cfg[item.alt].pm_max_children) }} + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = {{ item.cfg[item.key].pm_start_servers | default(item.cfg[item.alt].pm_start_servers) }} + +; The desired minimum number of idle server processes. +pm.min_spare_servers = {{ item.cfg[item.key].pm_min_spare_servers | default(item.cfg[item.alt].pm_min_spare_servers) }} + +; The desired maximum number of idle server processes. +pm.max_spare_servers = {{ item.cfg[item.key].pm_max_spare_servers | default(item.cfg[item.alt].pm_max_spare_servers) }} + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = {{ item.cfg[item.key].pm_max_requests | default(item.cfg[item.alt].pm_max_requests) }} + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = {{ item.cfg[item.key].pm_process_idle_timeout | default(item.cfg[item.alt].pm_process_idle_timeout) }} + + +; ############################################################ +; Include +; ############################################################ + + [global] -daemonize = no include = /usr/local/etc/php-fpm.d/*.conf + + +; ################################################################################ +; #### +; #### The following settings overwrite any includes again +; #### +; ################################################################################ + + +; ############################################################ +; Required for Dockerization +; ############################################################ + +[global] +daemonize = no + +[www] +{# This value is available since PHP >=5.4 #} +{% if not php_version == 5.3 %} +; Keep env variables set by docker +clear_env = {{ item.cfg[item.key].clear_env | default(item.cfg[item.alt].clear_env) }} +{% endif %} + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = {{ item.cfg[item.key].catch_workers_output | default(item.cfg[item.alt].catch_workers_output) }} + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = {{ item.cfg[item.key].user | default(item.cfg[item.alt].user) }} +group = {{ item.cfg[item.key].group | default(item.cfg[item.alt].group) }} + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = {{ item.cfg[item.key].listen | default(item.cfg[item.alt].listen)}} +{# Available since PHP >= 5.4 #} +listen.backlog = {{ item.cfg[item.key].listen_backlog | default(item.cfg[item.alt].listen_backlog) }} {% else %} {# PHP-FPM 5.2 uses XML format for configuration #} @@ -56,16 +178,6 @@ include = /usr/local/etc/php-fpm.d/*.conf Additional php.ini defines, specific to this pool of workers. - - E_ALL - {{ item.cfg[item.key].xmlrpc_errors | default(item.cfg[item.alt].xmlrpc_errors) }} - {{ item.cfg[item.key].report_memleaks | default(item.cfg[item.alt].report_memleaks) }} - {{ item.cfg[item.key].display_errors | default(item.cfg[item.alt].display_errors) }} - {{ item.cfg[item.key].display_startup_errors | default(item.cfg[item.alt].display_startup_errors) }} - {{ item.cfg[item.key].track_errors | default(item.cfg[item.alt].track_errors) }} - {{ item.cfg[item.key].log_errors | default(item.cfg[item.alt].log_errors) }} - {{ item.cfg[item.key].html_errors | default(item.cfg[item.alt].html_errors) }} - Unix user of processes {{ item.cfg[item.key].user | default(item.cfg[item.alt].user) }} diff --git a/build/ansible/CONFIGURATIONS/php-fpm.d-conf.j2 b/build/ansible/CONFIGURATIONS/php-fpm.d-conf.j2 deleted file mode 100644 index c1863127..00000000 --- a/build/ansible/CONFIGURATIONS/php-fpm.d-conf.j2 +++ /dev/null @@ -1,94 +0,0 @@ -{# PHP-FPM 5.2 uses XML format for configuration and does not allow multiple files #} -{% if not php_version == 5.2 %} -[www] - -; ############################################################ -; Required for Dockerization -; ############################################################ - -{# This value is available since PHP >=5.4 #} -{% if not php_version == 5.3 %} -; Keep env variables set by docker -clear_env = {{ item.cfg[item.key].clear_env | default(item.cfg[item.alt].clear_env) }} -{% endif %} - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -catch_workers_output = {{ item.cfg[item.key].catch_workers_output | default(item.cfg[item.alt].catch_workers_output) }} - - -; ############################################################ -; Networking -; ############################################################ - -[www] -; Ensure to listen here -listen = {{ item.cfg[item.key].listen | default(item.cfg[item.alt].listen)}} -{# Available since PHP >= 5.4 #} -listen.backlog = {{ item.cfg[item.key].listen_backlog | default(item.cfg[item.alt].listen_backlog) }} - - -; ############################################################ -; Timeouts -; ############################################################ - -[www] -; The timeout for serving a single request after which the worker process will be killed. -; This option should be used when the 'max_execution_time' ini option does not stop script -; execution for some reason. -request_terminate_timeout = {{ item.cfg[item.key].request_terminate_timeout | default(item.cfg[item.alt].request_terminate_timeout) }} - - -; ############################################################ -; Logging -; ############################################################ - -[global] -error_log = {{ item.cfg[item.key].error_log | default(item.cfg[item.alt].error_log) }} -log_level = {{ item.cfg[item.key].log_level | default(item.cfg[item.alt].log_level) }} - -[www] -; if we send this to /proc/self/fd/1, it never appears -access.log = {{ item.cfg[item.key].access_log | default(item.cfg[item.alt].access_log) }} - - -; ############################################################ -; Worker configuration -; ############################################################ - -[www] -; The number of child processes is set dynamically based on the following directives: -; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. -pm = {{ item.cfg[item.key].pm | default(item.cfg[item.alt].pm) }} - -; The maximum number of child processes to be created -pm.max_children = {{ item.cfg[item.key].pm_max_children | default(item.cfg[item.alt].pm_max_children) }} - -; The number of child processes created on startup. Used only when pm is set to dynamic. -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. -pm.start_servers = {{ item.cfg[item.key].pm_start_servers | default(item.cfg[item.alt].pm_start_servers) }} - -; The desired minimum number of idle server processes. -pm.min_spare_servers = {{ item.cfg[item.key].pm_min_spare_servers | default(item.cfg[item.alt].pm_min_spare_servers) }} - -; The desired maximum number of idle server processes. -pm.max_spare_servers = {{ item.cfg[item.key].pm_max_spare_servers | default(item.cfg[item.alt].pm_max_spare_servers) }} - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. -; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default value: 0. -pm.max_requests = {{ item.cfg[item.key].pm_max_requests | default(item.cfg[item.alt].pm_max_requests) }} - - -; ############################################################ -; User and Group -; ############################################################ - -[www] -user = {{ item.cfg[item.key].user | default(item.cfg[item.alt].user) }} -group = {{ item.cfg[item.key].group | default(item.cfg[item.alt].group) }} -{% endif %} diff --git a/build/ansible/DOCKERFILES/Dockerfile-base.j2 b/build/ansible/DOCKERFILES/Dockerfile-base.j2 index 58d35d95..be1ec426 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-base.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-base.j2 @@ -67,7 +67,6 @@ RUN set -x \ ### COPY ./data/php-ini.d/php-{{ php_version }}.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini COPY ./data/php-fpm.conf/php-fpm-{{ php_version }}.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d/php-fpm.d-{{ php_version }}.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d /docker-entrypoint.d diff --git a/build/ansible/DOCKERFILES/Dockerfile-work.j2 b/build/ansible/DOCKERFILES/Dockerfile-work.j2 index 2207b351..fc47940e 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-work.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-work.j2 @@ -193,7 +193,6 @@ RUN set -x \ ### COPY ./data/php-ini.d/php-{{ php_version }}.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini COPY ./data/php-fpm.conf/php-fpm-{{ php_version }}.conf /usr/local/etc/php-fpm.conf -COPY ./data/php-fpm.d/php-fpm.d-{{ php_version }}.conf /usr/local/etc/php-fpm.d/php-fpm.d.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ diff --git a/build/ansible/group_vars/all.yml b/build/ansible/group_vars/all.yml index 3e73eb72..493e4c2f 100644 --- a/build/ansible/group_vars/all.yml +++ b/build/ansible/group_vars/all.yml @@ -23,34 +23,7 @@ php_all_versions: ### ### PHP settings equal for php.ini and php-fpm.comf (used below) ### -php_settings_all: - # ---- Settings for PHP.INI and PHP-FPM.CONF ---- - base: - # Timeouts - timeout: 180 - # Error reporting - error_reporting: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED - xmlrpc_errors: 'Off' - report_memleaks: 'On' - display_errors: 'Off' - display_startup_errors: 'Off' - track_errors: 'On' - log_errors: 'On' - html_errors: 'Off' - - work: - # Timeouts - timeout: 180 - # Error reporting - error_reporting: E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED - xmlrpc_errors: 'Off' - report_memleaks: 'On' - display_errors: 'On' - display_startup_errors: 'On' - track_errors: 'On' - log_errors: 'On' - html_errors: 'On' - +php_timeout: 120 ### ### PHP.ini @@ -61,25 +34,26 @@ php_settings_ini: # Memory memory_limit: 512M # Timeouts - max_execution_time: "{{ php_settings_all.base.timeout }}" - max_input_time: "{{ php_settings_all.base.timeout }}" + max_execution_time: "{{ php_timeout }}" + max_input_time: "{{ php_timeout }}" # Uploads - post_max_size: 384M - upload_max_filesize: 256M + # Note: "post_max_size" should be greater than "upload_max_filesize" + post_max_size: 72M + upload_max_filesize: 64M max_file_uploads: 20 # Variables variables_order: EGPCS max_input_vars: 8000 max_input_nesting_level: 64 # Error reporting - error_reporting: "{{ php_settings_all.base.error_reporting }}" - xmlrpc_errors: "{{ php_settings_all.base.xmlrpc_errors }}" - report_memleaks: "{{ php_settings_all.base.report_memleaks }}" - display_errors: "{{ php_settings_all.base.display_errors }}" - display_startup_errors: "{{ php_settings_all.base.display_startup_errors }}" - track_errors: "{{ php_settings_all.base.track_errors }}" - log_errors: "{{ php_settings_all.base.log_errors }}" - html_errors: "{{ php_settings_all.base.html_errors }}" + error_reporting: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED + xmlrpc_errors: 'Off' + report_memleaks: 'On' + display_errors: 'Off' + display_startup_errors: 'Off' + track_errors: 'On' + log_errors: 'On' + html_errors: 'Off' # Xdebug settings xdebug_default_enable: 'Off' xdebug_profiler_enable: 'Off' @@ -93,14 +67,14 @@ php_settings_ini: # ---- Inherits from base and overwrites certain values ---- work: # Error reporting - error_reporting: "{{ php_settings_all.work.error_reporting }}" - xmlrpc_errors: "{{ php_settings_all.work.xmlrpc_errors }}" - report_memleaks: "{{ php_settings_all.work.report_memleaks }}" - display_errors: "{{ php_settings_all.work.display_errors }}" - display_startup_errors: "{{ php_settings_all.work.display_startup_errors }}" - track_errors: "{{ php_settings_all.work.track_errors }}" - log_errors: "{{ php_settings_all.work.log_errors }}" - html_errors: "{{ php_settings_all.work.html_errors }}" + error_reporting: E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED + xmlrpc_errors: 'Off' + report_memleaks: 'On' + display_errors: 'On' + display_startup_errors: 'On' + track_errors: 'On' + log_errors: 'On' + html_errors: 'On' # Xdebug settings xdebug_default_enable: 'Off' xdebug_profiler_enable: 'Off' @@ -118,48 +92,32 @@ php_settings_fpm: clear_env: 'no' catch_workers_output: 'yes' # Timeouts - request_terminate_timeout: "{{ php_settings_all.work.timeout }}s" + request_terminate_timeout: "{{ php_timeout }}s" # Network listen: 9000 - listen_backlog: 1023 + listen_backlog: 1024 # Logging log_level: notice error_log: /proc/self/fd/2 access_log: /proc/self/fd/2 # Worker - pm: dynamic - pm_max_children: 50 - pm_start_servers: 10 - pm_min_spare_servers: 5 - pm_max_spare_servers: 15 - pm_max_requests: 500 + pm: ondemand + pm_max_children: 50 # pm: dynamic, ondemand or static + pm_start_servers: 4 # only for pm: dynamic (min_spare + (max_spare-min_spare)/2 + pm_min_spare_servers: 2 # only for pm: dynamic + pm_max_spare_servers: 6 # only for pm: dynamic + pm_max_requests: 500 # pm: dynamic or ondemand + pm_process_idle_timeout: 10s # only for pm: ondemand + # User/Group user: devilbox group: devilbox - # Error reporting - error_reporting: "{{ php_settings_all.base.error_reporting }}" - xmlrpc_errors: "{{ php_settings_all.base.xmlrpc_errors }}" - report_memleaks: "{{ php_settings_all.base.report_memleaks }}" - display_errors: "{{ php_settings_all.base.display_errors }}" - display_startup_errors: "{{ php_settings_all.base.display_startup_errors }}" - track_errors: "{{ php_settings_all.base.track_errors }}" - log_errors: "{{ php_settings_all.base.log_errors }}" - html_errors: "{{ php_settings_all.base.html_errors }}" # ---- Inherits from base ---- mods: # ---- Inherits from base ---- prod: # ---- Inherits from base and overwrites certain values ---- work: - # Error reporting - error_reporting: "{{ php_settings_all.work.error_reporting }}" - xmlrpc_errors: "{{ php_settings_all.work.xmlrpc_errors }}" - report_memleaks: "{{ php_settings_all.work.report_memleaks }}" - display_errors: "{{ php_settings_all.work.display_errors }}" - display_startup_errors: "{{ php_settings_all.work.display_startup_errors }}" - track_errors: "{{ php_settings_all.work.track_errors }}" - log_errors: "{{ php_settings_all.work.log_errors }}" - html_errors: "{{ php_settings_all.work.html_errors }}" ### @@ -190,7 +148,6 @@ template_configurations: cfg: "{{ php_settings_ini }}" key: work alt: base # Alternative key to use when definition is not set in 'work' - # php-fpm.conf - src: CONFIGURATIONS/php-fpm.conf.j2 dst: "../../Dockerfiles/base/data/php-fpm.conf/php-fpm-{{ php_version }}.conf" @@ -203,18 +160,6 @@ template_configurations: key: work alt: base - # php-fpm.d-conf - - src: CONFIGURATIONS/php-fpm.d-conf.j2 - dst: "../../Dockerfiles/base/data/php-fpm.d/php-fpm.d-{{ php_version }}.conf" - cfg: "{{ php_settings_fpm }}" - key: base - alt: base - - src: CONFIGURATIONS/php-fpm.d-conf.j2 - dst: "../../Dockerfiles/work/data/php-fpm.d/php-fpm.d-{{ php_version }}.conf" - cfg: "{{ php_settings_fpm }}" - key: work - alt: base - ### ### Variables to be used in this file (group_vars/all.yml) From bd336c9e097c9c61edce5fa8f1265544f7781f16 Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 2 Aug 2018 21:55:44 +0200 Subject: [PATCH 17/24] Refs #30 Adjust tests for PHP 5.2 --- tests/base/04-test-run_nginx.sh | 6 + tests/prod/02-test-env-docker_logs-stdout.sh | 69 ++++---- tests/prod/03-test-env-docker_logs-file.sh | 168 ++++++++++--------- 3 files changed, 128 insertions(+), 115 deletions(-) diff --git a/tests/base/04-test-run_nginx.sh b/tests/base/04-test-run_nginx.sh index 9a4e66b4..637568a1 100755 --- a/tests/base/04-test-run_nginx.sh +++ b/tests/base/04-test-run_nginx.sh @@ -71,6 +71,12 @@ run "sleep 10" ### ### Check correct PHP-FPM user ### + +# On pm = ondemand, there will be no child process, so we need to create some traffic +# in order to have child proccesses spawn +for i in $(seq 1 10); do + curl http://127.0.0.1:${WWW_PORT}/index.php?${i} >/dev/null 2>&1 & +done if ! docker_exec "${did}" "ps auxw | grep -E '(php-fpm: pool|php-cgi)' | grep -v grep | awk '{ print \$1 }' | tail -1 | grep devilbox"; then docker_exec "${did}" "ps auxw" diff --git a/tests/prod/02-test-env-docker_logs-stdout.sh b/tests/prod/02-test-env-docker_logs-stdout.sh index 8f63b605..02e82e8e 100755 --- a/tests/prod/02-test-env-docker_logs-stdout.sh +++ b/tests/prod/02-test-env-docker_logs-stdout.sh @@ -122,38 +122,43 @@ if [ -f "${LOG_DIR_HOST}/php-fpm.error" ]; then exit 1 fi -if ! run "docker logs ${did} 2>&1 | grep -q 'GET /ok.php'"; then - echo "Error no access log string for 'GET /ok.php' found in stderr" - docker_logs "${did}" || true - docker_stop "${ndid}" || true - docker_stop "${did}" || true - rm -rf "${LOG_DIR_HOST}" - rm -rf "${CFG_DIR_HOST}" - rm -rf "${WWW_DIR_HOST}" - echo "Failed" - exit 1 -fi -if ! run "docker logs ${did} 2>&1 | grep -q 'GET /fail.php'"; then - echo "Error no access log string for 'GET /fail.php' found in stderr" - docker_logs "${did}" || true - docker_stop "${ndid}" || true - docker_stop "${did}" || true - rm -rf "${LOG_DIR_HOST}" - rm -rf "${CFG_DIR_HOST}" - rm -rf "${WWW_DIR_HOST}" - echo "Failed" - exit 1 -fi -if ! run "docker logs ${did} 2>&1 | grep -q '/var/www/default/fail.php'"; then - echo "Error no error message found in stderr" - docker_logs "${did}" || true - docker_stop "${ndid}" || true - docker_stop "${did}" || true - rm -rf "${LOG_DIR_HOST}" - rm -rf "${CFG_DIR_HOST}" - rm -rf "${WWW_DIR_HOST}" - echo "Failed" - exit 1 +### +### PHP 5.2 still does not show any errors +### +if [ "${VERSION}" != "5.2" ]; then + if ! run "docker logs ${did} 2>&1 | grep -q 'GET /ok.php'"; then + echo "Error no access log string for 'GET /ok.php' found in stderr" + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 + fi + if ! run "docker logs ${did} 2>&1 | grep -q 'GET /fail.php'"; then + echo "Error no access log string for 'GET /fail.php' found in stderr" + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 + fi + if ! run "docker logs ${did} 2>&1 | grep -q '/var/www/default/fail.php'"; then + echo "Error no error message found in stderr" + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 + fi fi diff --git a/tests/prod/03-test-env-docker_logs-file.sh b/tests/prod/03-test-env-docker_logs-file.sh index 89fd3106..e9eaa0aa 100755 --- a/tests/prod/03-test-env-docker_logs-file.sh +++ b/tests/prod/03-test-env-docker_logs-file.sh @@ -144,89 +144,91 @@ if [ ! -r "${LOG_DIR_HOST}/php-fpm.error" ]; then exit 1 fi -# Ensure no access/error goes to stderr -if run "docker logs ${did} 2>&1 | grep -q 'GET /ok.php'"; then - echo "Error access log string for 'GET /ok.php' found in stderr, but shold go to file" - run "cat ${LOG_DIR_HOST}/php-fpm.access" - run "cat ${LOG_DIR_HOST}/php-fpm.error" - docker_logs "${did}" || true - docker_stop "${ndid}" || true - docker_stop "${did}" || true - rm -rf "${LOG_DIR_HOST}" - rm -rf "${CFG_DIR_HOST}" - rm -rf "${WWW_DIR_HOST}" - echo "Failed" - exit 1 -fi -if run "docker logs ${did} 2>&1 | grep -q 'GET /fail.php'"; then - echo "Error access log string for 'GET /fail.php' found in stderr, but should go to file" - run "cat ${LOG_DIR_HOST}/php-fpm.access" - run "cat ${LOG_DIR_HOST}/php-fpm.error" - docker_logs "${did}" || true - docker_stop "${ndid}" || true - docker_stop "${did}" || true - rm -rf "${LOG_DIR_HOST}" - rm -rf "${CFG_DIR_HOST}" - rm -rf "${WWW_DIR_HOST}" - echo "Failed" - exit 1 -fi -if run "docker logs ${did} 2>&1 | grep -q '/var/www/default/fail.php'"; then - echo "Error error message found in stderr, but should go to file" - run "cat ${LOG_DIR_HOST}/php-fpm.access" - run "cat ${LOG_DIR_HOST}/php-fpm.error" - docker_logs "${did}" || true - docker_stop "${ndid}" || true - docker_stop "${did}" || true - rm -rf "${LOG_DIR_HOST}" - rm -rf "${CFG_DIR_HOST}" - rm -rf "${WWW_DIR_HOST}" - echo "Failed" - exit 1 -fi - - - - -# Test access and error file for correct content -if ! run "grep -q 'GET /ok.php' ${LOG_DIR_HOST}/php-fpm.access"; then - echo "Error no access log string for 'GET /ok.php' found in: ${LOG_DIR_HOST}/php-fpm.access" - run "cat ${LOG_DIR_HOST}/php-fpm.access" - run "cat ${LOG_DIR_HOST}/php-fpm.error" - docker_logs "${did}" || true - docker_stop "${ndid}" || true - docker_stop "${did}" || true - rm -rf "${LOG_DIR_HOST}" - rm -rf "${CFG_DIR_HOST}" - rm -rf "${WWW_DIR_HOST}" - echo "Failed" - exit 1 -fi -if ! run "grep -q 'GET /fail.php' ${LOG_DIR_HOST}/php-fpm.access"; then - echo "Error no access log string for 'GET /fail.php' found in: ${LOG_DIR_HOST}/php-fpm.access" - run "cat ${LOG_DIR_HOST}/php-fpm.access" - run "cat ${LOG_DIR_HOST}/php-fpm.error" - docker_logs "${did}" || true - docker_stop "${ndid}" || true - docker_stop "${did}" || true - rm -rf "${LOG_DIR_HOST}" - rm -rf "${CFG_DIR_HOST}" - rm -rf "${WWW_DIR_HOST}" - echo "Failed" - exit 1 -fi -if ! run "grep -q '/var/www/default/fail.php' ${LOG_DIR_HOST}/php-fpm.error"; then - echo "Error no error message found in: ${LOG_DIR_HOST}/php-fpm.error" - run "cat ${LOG_DIR_HOST}/php-fpm.access" - run "cat ${LOG_DIR_HOST}/php-fpm.error" - docker_logs "${did}" || true - docker_stop "${ndid}" || true - docker_stop "${did}" || true - rm -rf "${LOG_DIR_HOST}" - rm -rf "${CFG_DIR_HOST}" - rm -rf "${WWW_DIR_HOST}" - echo "Failed" - exit 1 +### +### PHP 5.2 still does not show any errors +### +if [ "${VERSION}" != "5.2" ]; then + # Ensure no access/error goes to stderr + if run "docker logs ${did} 2>&1 | grep -q 'GET /ok.php'"; then + echo "Error access log string for 'GET /ok.php' found in stderr, but shold go to file" + run "cat ${LOG_DIR_HOST}/php-fpm.access" + run "cat ${LOG_DIR_HOST}/php-fpm.error" + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 + fi + if run "docker logs ${did} 2>&1 | grep -q 'GET /fail.php'"; then + echo "Error access log string for 'GET /fail.php' found in stderr, but should go to file" + run "cat ${LOG_DIR_HOST}/php-fpm.access" + run "cat ${LOG_DIR_HOST}/php-fpm.error" + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 + fi + if run "docker logs ${did} 2>&1 | grep -q '/var/www/default/fail.php'"; then + echo "Error error message found in stderr, but should go to file" + run "cat ${LOG_DIR_HOST}/php-fpm.access" + run "cat ${LOG_DIR_HOST}/php-fpm.error" + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 + fi + + # Test access and error file for correct content + if ! run "grep -q 'GET /ok.php' ${LOG_DIR_HOST}/php-fpm.access"; then + echo "Error no access log string for 'GET /ok.php' found in: ${LOG_DIR_HOST}/php-fpm.access" + run "cat ${LOG_DIR_HOST}/php-fpm.access" + run "cat ${LOG_DIR_HOST}/php-fpm.error" + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 + fi + if ! run "grep -q 'GET /fail.php' ${LOG_DIR_HOST}/php-fpm.access"; then + echo "Error no access log string for 'GET /fail.php' found in: ${LOG_DIR_HOST}/php-fpm.access" + run "cat ${LOG_DIR_HOST}/php-fpm.access" + run "cat ${LOG_DIR_HOST}/php-fpm.error" + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 + fi + if ! run "grep -q '/var/www/default/fail.php' ${LOG_DIR_HOST}/php-fpm.error"; then + echo "Error no error message found in: ${LOG_DIR_HOST}/php-fpm.error" + run "cat ${LOG_DIR_HOST}/php-fpm.access" + run "cat ${LOG_DIR_HOST}/php-fpm.error" + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 + fi fi From 5a805fb015976e8ed222687310b47446509f2827 Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 2 Aug 2018 22:00:20 +0200 Subject: [PATCH 18/24] Finalize README --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 128e965e..840dd543 100644 --- a/README.md +++ b/README.md @@ -789,14 +789,14 @@ Have a look at the following table to see all offered exposed ports for each Doc

PHP Default Configuration

Each PHP version is using the same sane default php.ini values, making it pain-free to switch versions and not having to worry about different php.ini settings. -**Note:** Flavours alway inherit the settings from its parent flavour and will selectively overwrite specific settings. +**Note:** Flavours alway inherit the settings from its parent flavour if they have no own configuration. | Flavour | Applied php.ini files| |---------|------------------------------------------| -| base | [php.ini](Dockerfiles/base/data/php-ini.d/) [php-fpm.conf](Dockerfiles/base/data/php-fpm.conf/) [php-fpm.d](Dockerfiles/base/data/php-fpm.d/) | -| mods | - | -| prod | - | -| work | [php.ini](Dockerfiles/work/data/php-ini.d/) [php-fpm.conf](Dockerfiles/work/data/php-fpm.conf/) [php-fpm.d](Dockerfiles/work/data/php-fpm.d/) | +| base | [php.ini](Dockerfiles/base/data/php-ini.d/) and [php-fpm.conf](Dockerfiles/base/data/php-fpm.conf/) | +| mods | inherits from base | +| prod | inherits from base | +| work | [php.ini](Dockerfiles/work/data/php-ini.d/) [php-fpm.conf](Dockerfiles/work/data/php-fpm.conf/) | From f42a90758f244be4f4922af6426d726fd3f8c54d Mon Sep 17 00:00:00 2001 From: cytopia Date: Fri, 3 Aug 2018 01:10:38 +0200 Subject: [PATCH 19/24] Fix logging to file for PHP 5.3 --- .../docker-entrypoint.d/32-docker-logs.sh | 39 ++++++++++++------- Dockerfiles/prod/data/docker-entrypoint.sh | 6 ++- Dockerfiles/work/data/docker-entrypoint.sh | 6 ++- 3 files changed, 32 insertions(+), 19 deletions(-) diff --git a/Dockerfiles/prod/data/docker-entrypoint.d/32-docker-logs.sh b/Dockerfiles/prod/data/docker-entrypoint.d/32-docker-logs.sh index 8f0d6163..ab9de789 100755 --- a/Dockerfiles/prod/data/docker-entrypoint.d/32-docker-logs.sh +++ b/Dockerfiles/prod/data/docker-entrypoint.d/32-docker-logs.sh @@ -10,21 +10,26 @@ set -o pipefail ############################################################ _log_to_dockerlogs() { - local conf_logfile="${1}" + local php_fpm_conf="${1}" + local php_ini_conf="${2}" { echo "[global]" echo "error_log = /proc/self/fd/2" echo "[www]" echo "access.log = /proc/self/fd/2" - } > "${conf_logfile}" + } > "${php_fpm_conf}" + { + echo "error_log = /proc/self/fd/2" + } > "${php_ini_conf}" } _log_to_files() { - local conf_logfile="${1}" - local log_dir="${2}" - local user="${3}" - local group="${4}" - local debug="${5}" + local php_fpm_conf="${1}" + local php_ini_conf="${2}" + local log_dir="${3}" + local user="${4}" + local group="${5}" + local debug="${6}" # Create Log directory and files if [ ! -d "${log_dir}" ]; then @@ -43,7 +48,10 @@ _log_to_files() { echo "error_log = ${log_dir}/php-fpm.error" echo "[www]" echo "access.log = ${log_dir}/php-fpm.access" - } > "${conf_logfile}" + } > "${php_fpm_conf}" + { + echo "error_log = ${log_dir}/php-fpm.error" + } > "${php_ini_conf}" } @@ -77,17 +85,18 @@ is_docker_logs_enabled() { set_docker_logs() { local env_varname="${1}" local log_dir="${2}" - local conf_logfile="${3}" - local user="${4}" - local group="${5}" - local debug="${6}" + local php_fpm_conf="${3}" + local php_ini_conf="${4}" + local user="${5}" + local group="${6}" + local debug="${7}" local docker_logs= if ! env_set "${env_varname}"; then log "info" "\$${env_varname} not set." "${debug}" log "info" "Logging to docker logs (stdout and stderr)." "${debug}" - _log_to_dockerlogs "${conf_logfile}" + _log_to_dockerlogs "${php_fpm_conf}" "${php_ini_conf}" else docker_logs="$( env_get "${env_varname}" )" @@ -95,12 +104,12 @@ set_docker_logs() { if [ "${docker_logs}" = "0" ]; then log "info" "\$${env_varname} set to 0. Logging to files under: ${log_dir}" "${debug}" log "info" "Make sure to mount this directory in order to view logs" "${debug}" - _log_to_files "${conf_logfile}" "${log_dir}" "${user}" "${group}" "${debug}" + _log_to_files "${php_fpm_conf}" "${php_ini_conf}" "${log_dir}" "${user}" "${group}" "${debug}" # Keep docker logs elif [ "${docker_logs}" = "1" ]; then log "info" "\$${env_varname} set to 1. Logging to docker logs (stdout and stderr)." "${debug}" - _log_to_dockerlogs "${conf_logfile}" + _log_to_dockerlogs "${php_fpm_conf}" "${php_ini_conf}" else log "err" "Invalid value for \$${env_varname}. Can only be 0 or 1. Provided: ${docker_logs}" "${debug}" exit 1 diff --git a/Dockerfiles/prod/data/docker-entrypoint.sh b/Dockerfiles/prod/data/docker-entrypoint.sh index 3ee6522d..bb7ba64f 100755 --- a/Dockerfiles/prod/data/docker-entrypoint.sh +++ b/Dockerfiles/prod/data/docker-entrypoint.sh @@ -28,7 +28,8 @@ PHP_FPM_DIR="/usr/local/etc/php-fpm.d" PHP_MAIL_LOG="/var/log/mail.log" # This file holds error and access log definitions -FPM_CONF_LOGFILE="/usr/local/etc/php-fpm.d/logfiles.conf" +PHP_FPM_CONF_LOGFILE="${PHP_FPM_DIR}/zzzzzzz-logfiles.conf" +PHP_INI_CONF_LOGFILE="${PHP_INI_DIR}/zzzzzzz-logfiles.ini" # PHP-FPM log dir FPM_LOG_DIR="/var/log/php" @@ -92,7 +93,8 @@ fi set_docker_logs \ "DOCKER_LOGS" \ "${FPM_LOG_DIR}" \ - "${FPM_CONF_LOGFILE}" \ + "${PHP_FPM_CONF_LOGFILE}" \ + "${PHP_INI_CONF_LOGFILE}" \ "${MY_USER}" \ "${MY_GROUP}" \ "${DEBUG_LEVEL}" diff --git a/Dockerfiles/work/data/docker-entrypoint.sh b/Dockerfiles/work/data/docker-entrypoint.sh index 7e8398a5..6ac52e15 100755 --- a/Dockerfiles/work/data/docker-entrypoint.sh +++ b/Dockerfiles/work/data/docker-entrypoint.sh @@ -28,7 +28,8 @@ PHP_FPM_DIR="/usr/local/etc/php-fpm.d" PHP_MAIL_LOG="/var/log/mail.log" # This file holds error and access log definitions -FPM_CONF_LOGFILE="/usr/local/etc/php-fpm.d/logfiles.conf" +PHP_FPM_CONF_LOGFILE="${PHP_FPM_DIR}/zzzzzzz-logfiles.conf" +PHP_INI_CONF_LOGFILE="${PHP_INI_DIR}/zzzzzzz-logfiles.ini" # PHP-FPM log dir FPM_LOG_DIR="/var/log/php" @@ -92,7 +93,8 @@ fi set_docker_logs \ "DOCKER_LOGS" \ "${FPM_LOG_DIR}" \ - "${FPM_CONF_LOGFILE}" \ + "${PHP_FPM_CONF_LOGFILE}" \ + "${PHP_INI_CONF_LOGFILE}" \ "${MY_USER}" \ "${MY_GROUP}" \ "${DEBUG_LEVEL}" From 864e5035637b21dae8aef8647fbaf41624af4d9e Mon Sep 17 00:00:00 2001 From: cytopia Date: Fri, 3 Aug 2018 01:36:20 +0200 Subject: [PATCH 20/24] Ensure overwritable files are sorted --- Dockerfiles/base/Dockerfile-5.2 | 2 +- Dockerfiles/base/Dockerfile-5.3 | 2 +- Dockerfiles/base/Dockerfile-5.4 | 2 +- Dockerfiles/base/Dockerfile-5.5 | 2 +- Dockerfiles/base/Dockerfile-5.6 | 2 +- Dockerfiles/base/Dockerfile-7.0 | 2 +- Dockerfiles/base/Dockerfile-7.1 | 2 +- Dockerfiles/base/Dockerfile-7.2 | 2 +- Dockerfiles/base/Dockerfile-7.3 | 2 +- .../prod/data/docker-entrypoint.d/35-custom-ini-files.sh | 4 ++-- .../prod/data/docker-entrypoint.d/36-custom-php-fpm-files.sh | 4 ++-- Dockerfiles/prod/data/docker-entrypoint.sh | 4 ++-- Dockerfiles/work/Dockerfile-5.2 | 2 +- Dockerfiles/work/Dockerfile-5.3 | 2 +- Dockerfiles/work/Dockerfile-5.4 | 2 +- Dockerfiles/work/Dockerfile-5.5 | 2 +- Dockerfiles/work/Dockerfile-5.6 | 2 +- Dockerfiles/work/Dockerfile-7.0 | 2 +- Dockerfiles/work/Dockerfile-7.1 | 2 +- Dockerfiles/work/Dockerfile-7.2 | 2 +- Dockerfiles/work/Dockerfile-7.3 | 2 +- Dockerfiles/work/data/docker-entrypoint.sh | 4 ++-- build/ansible/DOCKERFILES/Dockerfile-base.j2 | 2 +- build/ansible/DOCKERFILES/Dockerfile-work.j2 | 2 +- 24 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Dockerfiles/base/Dockerfile-5.2 b/Dockerfiles/base/Dockerfile-5.2 index ce1a4758..55e6e595 100644 --- a/Dockerfiles/base/Dockerfile-5.2 +++ b/Dockerfiles/base/Dockerfile-5.2 @@ -57,7 +57,7 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php-ini.d/php-5.2.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-ini.d/php-5.2.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini COPY ./data/php-fpm.conf/php-fpm-5.2.conf /usr/local/etc/php-fpm.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh diff --git a/Dockerfiles/base/Dockerfile-5.3 b/Dockerfiles/base/Dockerfile-5.3 index 8c8c31fb..ff1a990a 100644 --- a/Dockerfiles/base/Dockerfile-5.3 +++ b/Dockerfiles/base/Dockerfile-5.3 @@ -57,7 +57,7 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php-ini.d/php-5.3.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-ini.d/php-5.3.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini COPY ./data/php-fpm.conf/php-fpm-5.3.conf /usr/local/etc/php-fpm.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh diff --git a/Dockerfiles/base/Dockerfile-5.4 b/Dockerfiles/base/Dockerfile-5.4 index 275baa9d..50580958 100644 --- a/Dockerfiles/base/Dockerfile-5.4 +++ b/Dockerfiles/base/Dockerfile-5.4 @@ -57,7 +57,7 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php-ini.d/php-5.4.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-ini.d/php-5.4.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini COPY ./data/php-fpm.conf/php-fpm-5.4.conf /usr/local/etc/php-fpm.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh diff --git a/Dockerfiles/base/Dockerfile-5.5 b/Dockerfiles/base/Dockerfile-5.5 index bac875ad..79efd6ef 100644 --- a/Dockerfiles/base/Dockerfile-5.5 +++ b/Dockerfiles/base/Dockerfile-5.5 @@ -57,7 +57,7 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php-ini.d/php-5.5.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-ini.d/php-5.5.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini COPY ./data/php-fpm.conf/php-fpm-5.5.conf /usr/local/etc/php-fpm.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh diff --git a/Dockerfiles/base/Dockerfile-5.6 b/Dockerfiles/base/Dockerfile-5.6 index 8f6d41d1..ef08f801 100644 --- a/Dockerfiles/base/Dockerfile-5.6 +++ b/Dockerfiles/base/Dockerfile-5.6 @@ -57,7 +57,7 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php-ini.d/php-5.6.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-ini.d/php-5.6.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini COPY ./data/php-fpm.conf/php-fpm-5.6.conf /usr/local/etc/php-fpm.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh diff --git a/Dockerfiles/base/Dockerfile-7.0 b/Dockerfiles/base/Dockerfile-7.0 index 0b897ca6..9d37c2b7 100644 --- a/Dockerfiles/base/Dockerfile-7.0 +++ b/Dockerfiles/base/Dockerfile-7.0 @@ -57,7 +57,7 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php-ini.d/php-7.0.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-ini.d/php-7.0.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini COPY ./data/php-fpm.conf/php-fpm-7.0.conf /usr/local/etc/php-fpm.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh diff --git a/Dockerfiles/base/Dockerfile-7.1 b/Dockerfiles/base/Dockerfile-7.1 index 6882cb64..4e354e50 100644 --- a/Dockerfiles/base/Dockerfile-7.1 +++ b/Dockerfiles/base/Dockerfile-7.1 @@ -57,7 +57,7 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php-ini.d/php-7.1.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-ini.d/php-7.1.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini COPY ./data/php-fpm.conf/php-fpm-7.1.conf /usr/local/etc/php-fpm.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh diff --git a/Dockerfiles/base/Dockerfile-7.2 b/Dockerfiles/base/Dockerfile-7.2 index 373dc28e..a5aa1b6f 100644 --- a/Dockerfiles/base/Dockerfile-7.2 +++ b/Dockerfiles/base/Dockerfile-7.2 @@ -57,7 +57,7 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php-ini.d/php-7.2.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-ini.d/php-7.2.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini COPY ./data/php-fpm.conf/php-fpm-7.2.conf /usr/local/etc/php-fpm.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh diff --git a/Dockerfiles/base/Dockerfile-7.3 b/Dockerfiles/base/Dockerfile-7.3 index 732ef3d7..9d2f474b 100644 --- a/Dockerfiles/base/Dockerfile-7.3 +++ b/Dockerfiles/base/Dockerfile-7.3 @@ -57,7 +57,7 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php-ini.d/php-7.3.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-ini.d/php-7.3.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini COPY ./data/php-fpm.conf/php-fpm-7.3.conf /usr/local/etc/php-fpm.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh diff --git a/Dockerfiles/prod/data/docker-entrypoint.d/35-custom-ini-files.sh b/Dockerfiles/prod/data/docker-entrypoint.d/35-custom-ini-files.sh index 54b47143..bb88a13b 100755 --- a/Dockerfiles/prod/data/docker-entrypoint.d/35-custom-ini-files.sh +++ b/Dockerfiles/prod/data/docker-entrypoint.d/35-custom-ini-files.sh @@ -27,8 +27,8 @@ copy_ini_files() { ' for ini_f in ${ini_files}; do ini_name="$( basename "${ini_f}" )" - log "info" "PHP.ini: ${ini_name} -> ${ini_dst}/zzz-devilbox-${ini_name}" "${debug}" - run "cp ${ini_f} ${ini_dst}/zzz-devilbox-${ini_name}" "${debug}" + log "info" "PHP.ini: ${ini_name} -> ${ini_dst}/yyy-devilbox-user-runtime-${ini_name}" "${debug}" + run "cp ${ini_f} ${ini_dst}/yyy-devilbox-user-runtime-${ini_name}" "${debug}" done run "find ${ini_dst} -type f -iname '*.ini' -exec chmod 0644 \"{}\" \;" "${debug}" } diff --git a/Dockerfiles/prod/data/docker-entrypoint.d/36-custom-php-fpm-files.sh b/Dockerfiles/prod/data/docker-entrypoint.d/36-custom-php-fpm-files.sh index 13e8a22d..587e2fb9 100755 --- a/Dockerfiles/prod/data/docker-entrypoint.d/36-custom-php-fpm-files.sh +++ b/Dockerfiles/prod/data/docker-entrypoint.d/36-custom-php-fpm-files.sh @@ -27,8 +27,8 @@ copy_fpm_files() { ' for fpm_f in ${fpm_files}; do fpm_name="$( basename "${fpm_f}" )" - log "info" "PHP-FPM.conf: ${fpm_name} -> ${fpm_dst}/zzz-devilbox-${fpm_name}" "${debug}" - run "cp ${fpm_f} ${fpm_dst}/zzz-devilbox-${fpm_name}" "${debug}" + log "info" "PHP-FPM.conf: ${fpm_name} -> ${fpm_dst}/yyy-devilbox-user-runtime-${fpm_name}" "${debug}" + run "cp ${fpm_f} ${fpm_dst}/yyy-devilbox-user-runtime-${fpm_name}" "${debug}" done run "find ${fpm_dst} -type f -iname '*.conf' -exec chmod 0644 \"{}\" \;" "${debug}" } diff --git a/Dockerfiles/prod/data/docker-entrypoint.sh b/Dockerfiles/prod/data/docker-entrypoint.sh index bb7ba64f..3a5a8fe2 100755 --- a/Dockerfiles/prod/data/docker-entrypoint.sh +++ b/Dockerfiles/prod/data/docker-entrypoint.sh @@ -28,8 +28,8 @@ PHP_FPM_DIR="/usr/local/etc/php-fpm.d" PHP_MAIL_LOG="/var/log/mail.log" # This file holds error and access log definitions -PHP_FPM_CONF_LOGFILE="${PHP_FPM_DIR}/zzzzzzz-logfiles.conf" -PHP_INI_CONF_LOGFILE="${PHP_INI_DIR}/zzzzzzz-logfiles.ini" +PHP_FPM_CONF_LOGFILE="${PHP_FPM_DIR}/zzz-entrypoint-logfiles.conf" +PHP_INI_CONF_LOGFILE="${PHP_INI_DIR}/zzz-entrypoint-logfiles.ini" # PHP-FPM log dir FPM_LOG_DIR="/var/log/php" diff --git a/Dockerfiles/work/Dockerfile-5.2 b/Dockerfiles/work/Dockerfile-5.2 index 56b6502b..b0b0f156 100644 --- a/Dockerfiles/work/Dockerfile-5.2 +++ b/Dockerfiles/work/Dockerfile-5.2 @@ -266,7 +266,7 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php-ini.d/php-5.2.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-ini.d/php-5.2.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini COPY ./data/php-fpm.conf/php-fpm-5.2.conf /usr/local/etc/php-fpm.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh diff --git a/Dockerfiles/work/Dockerfile-5.3 b/Dockerfiles/work/Dockerfile-5.3 index 2983b276..0fefc497 100644 --- a/Dockerfiles/work/Dockerfile-5.3 +++ b/Dockerfiles/work/Dockerfile-5.3 @@ -310,7 +310,7 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php-ini.d/php-5.3.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-ini.d/php-5.3.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini COPY ./data/php-fpm.conf/php-fpm-5.3.conf /usr/local/etc/php-fpm.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh diff --git a/Dockerfiles/work/Dockerfile-5.4 b/Dockerfiles/work/Dockerfile-5.4 index 004ca98c..8d748be3 100644 --- a/Dockerfiles/work/Dockerfile-5.4 +++ b/Dockerfiles/work/Dockerfile-5.4 @@ -325,7 +325,7 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php-ini.d/php-5.4.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-ini.d/php-5.4.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini COPY ./data/php-fpm.conf/php-fpm-5.4.conf /usr/local/etc/php-fpm.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh diff --git a/Dockerfiles/work/Dockerfile-5.5 b/Dockerfiles/work/Dockerfile-5.5 index e47eba3a..3f99917a 100644 --- a/Dockerfiles/work/Dockerfile-5.5 +++ b/Dockerfiles/work/Dockerfile-5.5 @@ -334,7 +334,7 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php-ini.d/php-5.5.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-ini.d/php-5.5.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini COPY ./data/php-fpm.conf/php-fpm-5.5.conf /usr/local/etc/php-fpm.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh diff --git a/Dockerfiles/work/Dockerfile-5.6 b/Dockerfiles/work/Dockerfile-5.6 index 4c7fdb9f..03b72142 100644 --- a/Dockerfiles/work/Dockerfile-5.6 +++ b/Dockerfiles/work/Dockerfile-5.6 @@ -334,7 +334,7 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php-ini.d/php-5.6.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-ini.d/php-5.6.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini COPY ./data/php-fpm.conf/php-fpm-5.6.conf /usr/local/etc/php-fpm.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh diff --git a/Dockerfiles/work/Dockerfile-7.0 b/Dockerfiles/work/Dockerfile-7.0 index 611869a1..76c8bcb8 100644 --- a/Dockerfiles/work/Dockerfile-7.0 +++ b/Dockerfiles/work/Dockerfile-7.0 @@ -334,7 +334,7 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php-ini.d/php-7.0.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-ini.d/php-7.0.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini COPY ./data/php-fpm.conf/php-fpm-7.0.conf /usr/local/etc/php-fpm.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh diff --git a/Dockerfiles/work/Dockerfile-7.1 b/Dockerfiles/work/Dockerfile-7.1 index 94d56a41..9fbfccf2 100644 --- a/Dockerfiles/work/Dockerfile-7.1 +++ b/Dockerfiles/work/Dockerfile-7.1 @@ -334,7 +334,7 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php-ini.d/php-7.1.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-ini.d/php-7.1.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini COPY ./data/php-fpm.conf/php-fpm-7.1.conf /usr/local/etc/php-fpm.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh diff --git a/Dockerfiles/work/Dockerfile-7.2 b/Dockerfiles/work/Dockerfile-7.2 index cedb7e20..518e221b 100644 --- a/Dockerfiles/work/Dockerfile-7.2 +++ b/Dockerfiles/work/Dockerfile-7.2 @@ -334,7 +334,7 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php-ini.d/php-7.2.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-ini.d/php-7.2.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini COPY ./data/php-fpm.conf/php-fpm-7.2.conf /usr/local/etc/php-fpm.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh diff --git a/Dockerfiles/work/Dockerfile-7.3 b/Dockerfiles/work/Dockerfile-7.3 index 492c3b76..7ea3bdd2 100644 --- a/Dockerfiles/work/Dockerfile-7.3 +++ b/Dockerfiles/work/Dockerfile-7.3 @@ -322,7 +322,7 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php-ini.d/php-7.3.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-ini.d/php-7.3.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini COPY ./data/php-fpm.conf/php-fpm-7.3.conf /usr/local/etc/php-fpm.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh diff --git a/Dockerfiles/work/data/docker-entrypoint.sh b/Dockerfiles/work/data/docker-entrypoint.sh index 6ac52e15..b5248f36 100755 --- a/Dockerfiles/work/data/docker-entrypoint.sh +++ b/Dockerfiles/work/data/docker-entrypoint.sh @@ -28,8 +28,8 @@ PHP_FPM_DIR="/usr/local/etc/php-fpm.d" PHP_MAIL_LOG="/var/log/mail.log" # This file holds error and access log definitions -PHP_FPM_CONF_LOGFILE="${PHP_FPM_DIR}/zzzzzzz-logfiles.conf" -PHP_INI_CONF_LOGFILE="${PHP_INI_DIR}/zzzzzzz-logfiles.ini" +PHP_FPM_CONF_LOGFILE="${PHP_FPM_DIR}/zzz-entrypoint-logfiles.conf" +PHP_INI_CONF_LOGFILE="${PHP_INI_DIR}/zzz-entrypoint-logfiles.ini" # PHP-FPM log dir FPM_LOG_DIR="/var/log/php" diff --git a/build/ansible/DOCKERFILES/Dockerfile-base.j2 b/build/ansible/DOCKERFILES/Dockerfile-base.j2 index be1ec426..4253891f 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-base.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-base.j2 @@ -65,7 +65,7 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php-ini.d/php-{{ php_version }}.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-ini.d/php-{{ php_version }}.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini COPY ./data/php-fpm.conf/php-fpm-{{ php_version }}.conf /usr/local/etc/php-fpm.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh diff --git a/build/ansible/DOCKERFILES/Dockerfile-work.j2 b/build/ansible/DOCKERFILES/Dockerfile-work.j2 index fc47940e..1ecc54ca 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-work.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-work.j2 @@ -191,7 +191,7 @@ RUN set -x \ ### ### Copy files ### -COPY ./data/php-ini.d/php-{{ php_version }}.ini /usr/local/etc/php/conf.d/yyy-devilbox.ini +COPY ./data/php-ini.d/php-{{ php_version }}.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini COPY ./data/php-fpm.conf/php-fpm-{{ php_version }}.conf /usr/local/etc/php-fpm.conf COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh From cf21dc3ea72090e27f5f87faece0d1c6b32d91a8 Mon Sep 17 00:00:00 2001 From: cytopia Date: Fri, 3 Aug 2018 22:51:03 +0200 Subject: [PATCH 21/24] PHP 5.2 Adjustments --- .../base/data/php-fpm.conf/php-fpm-5.2.conf | 24 +++++++++++++---- .../36-custom-php-fpm-files.sh | 16 ++++++++++++ .../37-fix-php-5.3-env-vars.sh | 2 +- Dockerfiles/prod/data/docker-entrypoint.sh | 10 ++++--- Dockerfiles/work/Dockerfile-5.2 | 1 + Dockerfiles/work/Dockerfile-5.3 | 1 + Dockerfiles/work/Dockerfile-5.4 | 1 + Dockerfiles/work/Dockerfile-5.5 | 1 + Dockerfiles/work/Dockerfile-5.6 | 1 + Dockerfiles/work/Dockerfile-7.0 | 1 + Dockerfiles/work/Dockerfile-7.1 | 1 + Dockerfiles/work/Dockerfile-7.2 | 1 + Dockerfiles/work/Dockerfile-7.3 | 1 + Dockerfiles/work/data/docker-entrypoint.sh | 8 ++++-- .../work/data/php-fpm.conf/php-fpm-5.2.conf | 24 +++++++++++++---- build/ansible/CONFIGURATIONS/php-fpm.conf.j2 | 26 ++++++++++++++----- build/ansible/DOCKERFILES/Dockerfile-work.j2 | 1 + 17 files changed, 98 insertions(+), 22 deletions(-) diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.2.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.2.conf index b84509e4..7daaeb75 100644 --- a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.2.conf +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.2.conf @@ -32,7 +32,7 @@
Name of pool. Used in logs and stats. - default + www Address to accept fastcgi requests on. Valid syntax is 'ip.ad.re.ss:port' or just 'port' or '/path/to/unix/socket' @@ -50,6 +50,16 @@ Additional php.ini defines, specific to this pool of workers. + + 6135 + 0 + 1 + 0 + 0 + 1 + 1 + 0 + Unix user of processes devilbox @@ -68,21 +78,25 @@ Equivalent to Apache MaxClients directive. Equivalent to PHP_FCGI_CHILDREN environment in original php.fcgi Used with any pm_style. - 50 + + 5 Settings group for 'apache-like' pm style Sets the number of server processes created on startup. Used only when 'apache-like' pm_style is selected - 4 + + 3 Sets the desired minimum number of idle server processes. Used only when 'apache-like' pm_style is selected + 2 Sets the desired maximum number of idle server processes. Used only when 'apache-like' pm_style is selected - 6 + + 4 @@ -97,7 +111,7 @@ 0s The log file for slow requests - logs/slow.log + /proc/self/fd/2 Set open file desc rlimit 1024 diff --git a/Dockerfiles/prod/data/docker-entrypoint.d/36-custom-php-fpm-files.sh b/Dockerfiles/prod/data/docker-entrypoint.d/36-custom-php-fpm-files.sh index 587e2fb9..c4d119c4 100755 --- a/Dockerfiles/prod/data/docker-entrypoint.d/36-custom-php-fpm-files.sh +++ b/Dockerfiles/prod/data/docker-entrypoint.d/36-custom-php-fpm-files.sh @@ -33,6 +33,22 @@ copy_fpm_files() { run "find ${fpm_dst} -type f -iname '*.conf' -exec chmod 0644 \"{}\" \;" "${debug}" } +### +### Copy php-fpm.conf for PHP 5.2 +### Note: PHP 5.2 does not allow includes and comes in XML format, +### we must therefore copy the file to its main file /usr/local/etc/php-fpm.conf +### +copy_fpm_5_2_conf_file() { + local fpm_src="${1}" + local fpm_dst="/usr/local/etc/php-fpm.conf" + local debug="${2}" + + if [ -f "${fpm_src}" ]; then + log "info" "PHP-FPM.conf (PHP 5.2): php-fpm.xml -> ${fpm_dst}" "${debug}" + run "cp ${fpm_src} ${fpm_dst}" "${debug}" + fi +} + ############################################################ # Sanity Checks diff --git a/Dockerfiles/prod/data/docker-entrypoint.d/37-fix-php-5.3-env-vars.sh b/Dockerfiles/prod/data/docker-entrypoint.d/37-fix-php-5.3-env-vars.sh index 2221e707..af877ec6 100755 --- a/Dockerfiles/prod/data/docker-entrypoint.d/37-fix-php-5.3-env-vars.sh +++ b/Dockerfiles/prod/data/docker-entrypoint.d/37-fix-php-5.3-env-vars.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# PHP FPM 5.3 does not allow to pass through environment variables +# PHP FPM 5.2 and PHP-FPM 5.3 do not allow to pass through environment variables # This is a hacky shell script to create: # env[NAME]='VALUE' entries for PHP FPM config out of all current env vars diff --git a/Dockerfiles/prod/data/docker-entrypoint.sh b/Dockerfiles/prod/data/docker-entrypoint.sh index 3a5a8fe2..970820d9 100755 --- a/Dockerfiles/prod/data/docker-entrypoint.sh +++ b/Dockerfiles/prod/data/docker-entrypoint.sh @@ -80,9 +80,9 @@ set_timezone "TIMEZONE" "${PHP_INI_DIR}" "${DEBUG_LEVEL}" ### -### PHP-FPM 5.3 Env variables +### PHP-FPM 5.2 and PHP-FPM 5.3 Env variables fix ### -if php -v 2>/dev/null | grep -Eoq '^PHP[[:space:]]5\.3'; then +if php -v 2>/dev/null | grep -Eoq '^PHP[[:space:]]5\.(2|3)'; then set_env_php_fpm "/usr/local/etc/php-fpm.d/env.conf" fi @@ -159,7 +159,11 @@ copy_ini_files "${PHP_CUST_INI_DIR}" "${PHP_INI_DIR}" "${DEBUG_LEVEL}" ### ### Copy custom PHP-FPM *.conf files ### -copy_fpm_files "${PHP_CUST_FPM_DIR}" "${PHP_FPM_DIR}" "${DEBUG_LEVEL}" +if [ "${PHP_VERSION}" = "5.2" ]; then + copy_fpm_5_2_conf_file "${PHP_CUST_FPM_DIR}/php-fpm.xml" "${DEBUG_LEVEL}" +else + copy_fpm_files "${PHP_CUST_FPM_DIR}" "${PHP_FPM_DIR}" "${DEBUG_LEVEL}" +fi ### diff --git a/Dockerfiles/work/Dockerfile-5.2 b/Dockerfiles/work/Dockerfile-5.2 index b0b0f156..f79173c5 100644 --- a/Dockerfiles/work/Dockerfile-5.2 +++ b/Dockerfiles/work/Dockerfile-5.2 @@ -65,6 +65,7 @@ RUN set -x \ libc-dev \ libffi-dev\ libssl-dev\ + libyaml-dev \ make \ mongodb-org-shell \ mongodb-org-tools \ diff --git a/Dockerfiles/work/Dockerfile-5.3 b/Dockerfiles/work/Dockerfile-5.3 index 0fefc497..ab5614c0 100644 --- a/Dockerfiles/work/Dockerfile-5.3 +++ b/Dockerfiles/work/Dockerfile-5.3 @@ -65,6 +65,7 @@ RUN set -x \ libc-dev \ libffi-dev\ libssl-dev\ + libyaml-dev \ make \ mongodb-org-shell \ mongodb-org-tools \ diff --git a/Dockerfiles/work/Dockerfile-5.4 b/Dockerfiles/work/Dockerfile-5.4 index 8d748be3..ef1f513d 100644 --- a/Dockerfiles/work/Dockerfile-5.4 +++ b/Dockerfiles/work/Dockerfile-5.4 @@ -65,6 +65,7 @@ RUN set -x \ libc-dev \ libffi-dev\ libssl-dev\ + libyaml-dev \ make \ mongodb-org-shell \ mongodb-org-tools \ diff --git a/Dockerfiles/work/Dockerfile-5.5 b/Dockerfiles/work/Dockerfile-5.5 index 3f99917a..8c3e7229 100644 --- a/Dockerfiles/work/Dockerfile-5.5 +++ b/Dockerfiles/work/Dockerfile-5.5 @@ -65,6 +65,7 @@ RUN set -x \ libc-dev \ libffi-dev\ libssl-dev\ + libyaml-dev \ make \ mongodb-org-shell \ mongodb-org-tools \ diff --git a/Dockerfiles/work/Dockerfile-5.6 b/Dockerfiles/work/Dockerfile-5.6 index 03b72142..65e7a250 100644 --- a/Dockerfiles/work/Dockerfile-5.6 +++ b/Dockerfiles/work/Dockerfile-5.6 @@ -65,6 +65,7 @@ RUN set -x \ libc-dev \ libffi-dev\ libssl-dev\ + libyaml-dev \ make \ mongodb-org-shell \ mongodb-org-tools \ diff --git a/Dockerfiles/work/Dockerfile-7.0 b/Dockerfiles/work/Dockerfile-7.0 index 76c8bcb8..2b551868 100644 --- a/Dockerfiles/work/Dockerfile-7.0 +++ b/Dockerfiles/work/Dockerfile-7.0 @@ -65,6 +65,7 @@ RUN set -x \ libc-dev \ libffi-dev\ libssl-dev\ + libyaml-dev \ make \ mongodb-org-shell \ mongodb-org-tools \ diff --git a/Dockerfiles/work/Dockerfile-7.1 b/Dockerfiles/work/Dockerfile-7.1 index 9fbfccf2..11ee058c 100644 --- a/Dockerfiles/work/Dockerfile-7.1 +++ b/Dockerfiles/work/Dockerfile-7.1 @@ -65,6 +65,7 @@ RUN set -x \ libc-dev \ libffi-dev\ libssl-dev\ + libyaml-dev \ make \ mongodb-org-shell \ mongodb-org-tools \ diff --git a/Dockerfiles/work/Dockerfile-7.2 b/Dockerfiles/work/Dockerfile-7.2 index 518e221b..6dbfee18 100644 --- a/Dockerfiles/work/Dockerfile-7.2 +++ b/Dockerfiles/work/Dockerfile-7.2 @@ -65,6 +65,7 @@ RUN set -x \ libc-dev \ libffi-dev\ libssl-dev\ + libyaml-dev \ make \ mongodb-org-shell \ mongodb-org-tools \ diff --git a/Dockerfiles/work/Dockerfile-7.3 b/Dockerfiles/work/Dockerfile-7.3 index 7ea3bdd2..3be4e510 100644 --- a/Dockerfiles/work/Dockerfile-7.3 +++ b/Dockerfiles/work/Dockerfile-7.3 @@ -65,6 +65,7 @@ RUN set -x \ libc-dev \ libffi-dev\ libssl-dev\ + libyaml-dev \ make \ mongodb-org-shell \ mongodb-org-tools \ diff --git a/Dockerfiles/work/data/docker-entrypoint.sh b/Dockerfiles/work/data/docker-entrypoint.sh index b5248f36..afe08bd3 100755 --- a/Dockerfiles/work/data/docker-entrypoint.sh +++ b/Dockerfiles/work/data/docker-entrypoint.sh @@ -80,9 +80,9 @@ set_timezone "TIMEZONE" "${PHP_INI_DIR}" "${DEBUG_LEVEL}" ### -### PHP-FPM 5.3 Env variables +### PHP-FPM 5.2 and PHP-FPM 5.3 Env variables fix ### -if php -v 2>/dev/null | grep -Eoq '^PHP[[:space:]]5\.3'; then +if php -v 2>/dev/null | grep -Eoq '^PHP[[:space:]]5\.(2|3)'; then set_env_php_fpm "/usr/local/etc/php-fpm.d/env.conf" fi @@ -159,7 +159,11 @@ copy_ini_files "${PHP_CUST_INI_DIR}" "${PHP_INI_DIR}" "${DEBUG_LEVEL}" ### ### Copy custom PHP-FPM *.conf files ### +if [ "${PHP_VERSION}" = "5.2" ]; then + copy_fpm_5_2_conf_file "${PHP_CUST_FPM_DIR}/php-fpm.xml" "${DEBUG_LEVEL}" +else copy_fpm_files "${PHP_CUST_FPM_DIR}" "${PHP_FPM_DIR}" "${DEBUG_LEVEL}" +fi ### diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.2.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.2.conf index b84509e4..efd82405 100644 --- a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.2.conf +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.2.conf @@ -32,7 +32,7 @@
Name of pool. Used in logs and stats. - default + www Address to accept fastcgi requests on. Valid syntax is 'ip.ad.re.ss:port' or just 'port' or '/path/to/unix/socket' @@ -50,6 +50,16 @@ Additional php.ini defines, specific to this pool of workers. + + -1 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + Unix user of processes devilbox @@ -68,21 +78,25 @@ Equivalent to Apache MaxClients directive. Equivalent to PHP_FCGI_CHILDREN environment in original php.fcgi Used with any pm_style. - 50 + + 5 Settings group for 'apache-like' pm style Sets the number of server processes created on startup. Used only when 'apache-like' pm_style is selected - 4 + + 3 Sets the desired minimum number of idle server processes. Used only when 'apache-like' pm_style is selected + 2 Sets the desired maximum number of idle server processes. Used only when 'apache-like' pm_style is selected - 6 + + 4 @@ -97,7 +111,7 @@ 0s The log file for slow requests - logs/slow.log + /proc/self/fd/2 Set open file desc rlimit 1024 diff --git a/build/ansible/CONFIGURATIONS/php-fpm.conf.j2 b/build/ansible/CONFIGURATIONS/php-fpm.conf.j2 index 7bacedec..d4d297c6 100644 --- a/build/ansible/CONFIGURATIONS/php-fpm.conf.j2 +++ b/build/ansible/CONFIGURATIONS/php-fpm.conf.j2 @@ -160,7 +160,7 @@ listen.backlog = {{ item.cfg[item.key].listen_backlog | default(item.cfg[item.al
Name of pool. Used in logs and stats. - default + www Address to accept fastcgi requests on. Valid syntax is 'ip.ad.re.ss:port' or just 'port' or '/path/to/unix/socket' @@ -178,6 +178,16 @@ listen.backlog = {{ item.cfg[item.key].listen_backlog | default(item.cfg[item.al Additional php.ini defines, specific to this pool of workers. + + {% if item.key == 'base' %}6135{% else %}-1{% endif %} + 0 + 1 + {% if item.key == 'base' %}0{% else %}1{% endif %} + {% if item.key == 'base' %}0{% else %}1{% endif %} + 1 + 1 + {% if item.key == 'base' %}0{% else %}1{% endif %} + Unix user of processes {{ item.cfg[item.key].user | default(item.cfg[item.alt].user) }} @@ -196,21 +206,25 @@ listen.backlog = {{ item.cfg[item.key].listen_backlog | default(item.cfg[item.al Equivalent to Apache MaxClients directive. Equivalent to PHP_FCGI_CHILDREN environment in original php.fcgi Used with any pm_style. - {{ item.cfg[item.key].pm_max_children | default(item.cfg[item.alt].pm_max_children) }} + + 5 Settings group for 'apache-like' pm style Sets the number of server processes created on startup. Used only when 'apache-like' pm_style is selected - {{ item.cfg[item.key].pm_start_servers | default(item.cfg[item.alt].pm_start_servers) }} + + 3 Sets the desired minimum number of idle server processes. Used only when 'apache-like' pm_style is selected - {{ item.cfg[item.key].pm_min_spare_servers | default(item.cfg[item.alt].pm_min_spare_servers) }} + + 2 Sets the desired maximum number of idle server processes. Used only when 'apache-like' pm_style is selected - {{ item.cfg[item.key].pm_max_spare_servers | default(item.cfg[item.alt].pm_max_spare_servers) }} + + 4 @@ -225,7 +239,7 @@ listen.backlog = {{ item.cfg[item.key].listen_backlog | default(item.cfg[item.al 0s The log file for slow requests - logs/slow.log + {{ item.cfg[item.key].error_log | default(item.cfg[item.alt].error_log) }} Set open file desc rlimit 1024 diff --git a/build/ansible/DOCKERFILES/Dockerfile-work.j2 b/build/ansible/DOCKERFILES/Dockerfile-work.j2 index 1ecc54ca..f76b64ff 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-work.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-work.j2 @@ -80,6 +80,7 @@ RUN set -x \ libc-dev \ libffi-dev\ libssl-dev\ + libyaml-dev \ make \ mongodb-org-shell \ mongodb-org-tools \ From 04a24b69b6212dac4d0584581ec8d4b39f9d9a49 Mon Sep 17 00:00:00 2001 From: cytopia Date: Fri, 3 Aug 2018 23:37:18 +0200 Subject: [PATCH 22/24] Skip test for PHP 5.2 --- tests/prod/07-test-mount-custom_fpm_conf.sh | 85 +++++++++------------ 1 file changed, 35 insertions(+), 50 deletions(-) diff --git a/tests/prod/07-test-mount-custom_fpm_conf.sh b/tests/prod/07-test-mount-custom_fpm_conf.sh index fe1b7723..9f81d454 100755 --- a/tests/prod/07-test-mount-custom_fpm_conf.sh +++ b/tests/prod/07-test-mount-custom_fpm_conf.sh @@ -18,6 +18,11 @@ FLAVOUR="${3}" ############################################################ # Tests ############################################################ +if [ "${VERSION}" != "5.2" ]; then + echo "Skipping tests for PHP 5.2" + exit 0 +fi + ### ### Test Nginx with PHP-FPM @@ -34,24 +39,7 @@ PHP_CNF_CONT="/etc/php-fpm-custom.d" CONTAINER="nginx:stable" -if [ "${VERSION}" = "5.2" ]; then - { - echo ''; - echo ''; - echo ' '; - echo '
'; - echo ' '; - echo ' 17M'; - echo ' 17M'; - echo ' 17M'; - echo ' '; - echo '
'; - echo '
'; - echo '
'; - } > "${PHP_CNF_HOST}/post.conf" -else - printf "[www]\nphp_admin_value[memory_limit] = 17M\n" > "${PHP_CNF_HOST}/post.conf" -fi +printf "[www]\nphp_admin_value[memory_limit] = 17M\n" > "${PHP_CNF_HOST}/post.conf" echo " "${DOC_ROOT_HOST}/index.php" # Fix mount permissions @@ -139,38 +127,35 @@ fi # Check modified php-fpm.conf -# Does not work with PHP 5.2 -if [ "${VERSION}" != "5.2" ]; then - if ! run "curl -q -4 http://127.0.0.1:${WWW_PORT}/index.php 2>/dev/null | grep memory_limit | grep '17M'"; then - # Info - run "netstat -tuln" - run "curl -4 http://127.0.0.1:${WWW_PORT}/index.php | grep memory_limit" || true - run "docker ps --no-trunc" - docker_exec "${ndid}" "nginx -t" - - # Show logs - docker_logs "${ndid}" || true - docker_logs "${did}" || true - - # Ensure file is available - docker_exec "${ndid}" "ls -la ${DOC_ROOT_CONT}/" - docker_exec "${did}" "ls -la ${DOC_ROOT_CONT}/" - - docker_exec "${ndid}" "cat ${DOC_ROOT_CONT}/index.php" - docker_exec "${did}" "cat ${DOC_ROOT_CONT}/index.php" - - # Nginx configuration - docker_exec "${ndid}" "cat ${CONFIG_CONT}/php.conf" - - # Shutdown - docker_stop "${ndid}" || true - docker_stop "${did}" || true - rm -rf "${DOC_ROOT_HOST}" - rm -rf "${CONFIG_HOST}" - rm -rf "${PHP_CNF_HOST}" - echo "Failed" - exit 1 - fi +if ! run "curl -q -4 http://127.0.0.1:${WWW_PORT}/index.php 2>/dev/null | grep memory_limit | grep '17M'"; then + # Info + run "netstat -tuln" + run "curl -4 http://127.0.0.1:${WWW_PORT}/index.php | grep memory_limit" || true + run "docker ps --no-trunc" + docker_exec "${ndid}" "nginx -t" + + # Show logs + docker_logs "${ndid}" || true + docker_logs "${did}" || true + + # Ensure file is available + docker_exec "${ndid}" "ls -la ${DOC_ROOT_CONT}/" + docker_exec "${did}" "ls -la ${DOC_ROOT_CONT}/" + + docker_exec "${ndid}" "cat ${DOC_ROOT_CONT}/index.php" + docker_exec "${did}" "cat ${DOC_ROOT_CONT}/index.php" + + # Nginx configuration + docker_exec "${ndid}" "cat ${CONFIG_CONT}/php.conf" + + # Shutdown + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${DOC_ROOT_HOST}" + rm -rf "${CONFIG_HOST}" + rm -rf "${PHP_CNF_HOST}" + echo "Failed" + exit 1 fi From 7902a6a1ab687a3ebb7a743f6a9fcbe393acb9ca Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Aug 2018 02:04:06 +0200 Subject: [PATCH 23/24] Fix tests for PHP 5.2 --- tests/prod/03-test-env-docker_logs-file.sh | 112 ++++++++++---------- tests/prod/07-test-mount-custom_fpm_conf.sh | 2 +- 2 files changed, 56 insertions(+), 58 deletions(-) diff --git a/tests/prod/03-test-env-docker_logs-file.sh b/tests/prod/03-test-env-docker_logs-file.sh index e9eaa0aa..deeb79a1 100755 --- a/tests/prod/03-test-env-docker_logs-file.sh +++ b/tests/prod/03-test-env-docker_logs-file.sh @@ -144,51 +144,49 @@ if [ ! -r "${LOG_DIR_HOST}/php-fpm.error" ]; then exit 1 fi -### -### PHP 5.2 still does not show any errors -### -if [ "${VERSION}" != "5.2" ]; then - # Ensure no access/error goes to stderr - if run "docker logs ${did} 2>&1 | grep -q 'GET /ok.php'"; then - echo "Error access log string for 'GET /ok.php' found in stderr, but shold go to file" - run "cat ${LOG_DIR_HOST}/php-fpm.access" - run "cat ${LOG_DIR_HOST}/php-fpm.error" - docker_logs "${did}" || true - docker_stop "${ndid}" || true - docker_stop "${did}" || true - rm -rf "${LOG_DIR_HOST}" - rm -rf "${CFG_DIR_HOST}" - rm -rf "${WWW_DIR_HOST}" - echo "Failed" - exit 1 - fi - if run "docker logs ${did} 2>&1 | grep -q 'GET /fail.php'"; then - echo "Error access log string for 'GET /fail.php' found in stderr, but should go to file" - run "cat ${LOG_DIR_HOST}/php-fpm.access" - run "cat ${LOG_DIR_HOST}/php-fpm.error" - docker_logs "${did}" || true - docker_stop "${ndid}" || true - docker_stop "${did}" || true - rm -rf "${LOG_DIR_HOST}" - rm -rf "${CFG_DIR_HOST}" - rm -rf "${WWW_DIR_HOST}" - echo "Failed" - exit 1 - fi - if run "docker logs ${did} 2>&1 | grep -q '/var/www/default/fail.php'"; then - echo "Error error message found in stderr, but should go to file" - run "cat ${LOG_DIR_HOST}/php-fpm.access" - run "cat ${LOG_DIR_HOST}/php-fpm.error" - docker_logs "${did}" || true - docker_stop "${ndid}" || true - docker_stop "${did}" || true - rm -rf "${LOG_DIR_HOST}" - rm -rf "${CFG_DIR_HOST}" - rm -rf "${WWW_DIR_HOST}" - echo "Failed" - exit 1 - fi +# Ensure no access/error goes to stderr +if run "docker logs ${did} 2>&1 | grep -q 'GET /ok.php'"; then + echo "Error access log string for 'GET /ok.php' found in stderr, but shold go to file" + run "cat ${LOG_DIR_HOST}/php-fpm.access" + run "cat ${LOG_DIR_HOST}/php-fpm.error" + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 +fi +if run "docker logs ${did} 2>&1 | grep -q 'GET /fail.php'"; then + echo "Error access log string for 'GET /fail.php' found in stderr, but should go to file" + run "cat ${LOG_DIR_HOST}/php-fpm.access" + run "cat ${LOG_DIR_HOST}/php-fpm.error" + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 +fi +if run "docker logs ${did} 2>&1 | grep -q '/var/www/default/fail.php'"; then + echo "Error error message found in stderr, but should go to file" + run "cat ${LOG_DIR_HOST}/php-fpm.access" + run "cat ${LOG_DIR_HOST}/php-fpm.error" + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 +fi +# PHP-FPM 5.2 does not show access logs +if [ "${VERSION}" != "5.2" ]; then # Test access and error file for correct content if ! run "grep -q 'GET /ok.php' ${LOG_DIR_HOST}/php-fpm.access"; then echo "Error no access log string for 'GET /ok.php' found in: ${LOG_DIR_HOST}/php-fpm.access" @@ -216,19 +214,19 @@ if [ "${VERSION}" != "5.2" ]; then echo "Failed" exit 1 fi - if ! run "grep -q '/var/www/default/fail.php' ${LOG_DIR_HOST}/php-fpm.error"; then - echo "Error no error message found in: ${LOG_DIR_HOST}/php-fpm.error" - run "cat ${LOG_DIR_HOST}/php-fpm.access" - run "cat ${LOG_DIR_HOST}/php-fpm.error" - docker_logs "${did}" || true - docker_stop "${ndid}" || true - docker_stop "${did}" || true - rm -rf "${LOG_DIR_HOST}" - rm -rf "${CFG_DIR_HOST}" - rm -rf "${WWW_DIR_HOST}" - echo "Failed" - exit 1 - fi +fi +if ! run "grep -q '/var/www/default/fail.php' ${LOG_DIR_HOST}/php-fpm.error"; then + echo "Error no error message found in: ${LOG_DIR_HOST}/php-fpm.error" + run "cat ${LOG_DIR_HOST}/php-fpm.access" + run "cat ${LOG_DIR_HOST}/php-fpm.error" + docker_logs "${did}" || true + docker_stop "${ndid}" || true + docker_stop "${did}" || true + rm -rf "${LOG_DIR_HOST}" + rm -rf "${CFG_DIR_HOST}" + rm -rf "${WWW_DIR_HOST}" + echo "Failed" + exit 1 fi diff --git a/tests/prod/07-test-mount-custom_fpm_conf.sh b/tests/prod/07-test-mount-custom_fpm_conf.sh index 9f81d454..c3b3be21 100755 --- a/tests/prod/07-test-mount-custom_fpm_conf.sh +++ b/tests/prod/07-test-mount-custom_fpm_conf.sh @@ -18,7 +18,7 @@ FLAVOUR="${3}" ############################################################ # Tests ############################################################ -if [ "${VERSION}" != "5.2" ]; then +if [ "${VERSION}" = "5.2" ]; then echo "Skipping tests for PHP 5.2" exit 0 fi From c8a55c36e9da9c26bd9706b09be803969fa893f6 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Aug 2018 02:04:28 +0200 Subject: [PATCH 24/24] Default to system defined backlog value --- .../base/data/php-fpm.conf/php-fpm-5.2.conf | 2 +- .../base/data/php-fpm.conf/php-fpm-5.3.conf | 17 +++++++++++++++-- .../base/data/php-fpm.conf/php-fpm-5.4.conf | 17 +++++++++++++++-- .../base/data/php-fpm.conf/php-fpm-5.5.conf | 17 +++++++++++++++-- .../base/data/php-fpm.conf/php-fpm-5.6.conf | 17 +++++++++++++++-- .../base/data/php-fpm.conf/php-fpm-7.0.conf | 17 +++++++++++++++-- .../base/data/php-fpm.conf/php-fpm-7.1.conf | 17 +++++++++++++++-- .../base/data/php-fpm.conf/php-fpm-7.2.conf | 17 +++++++++++++++-- .../base/data/php-fpm.conf/php-fpm-7.3.conf | 17 +++++++++++++++-- .../work/data/php-fpm.conf/php-fpm-5.2.conf | 2 +- .../work/data/php-fpm.conf/php-fpm-5.3.conf | 17 +++++++++++++++-- .../work/data/php-fpm.conf/php-fpm-5.4.conf | 17 +++++++++++++++-- .../work/data/php-fpm.conf/php-fpm-5.5.conf | 17 +++++++++++++++-- .../work/data/php-fpm.conf/php-fpm-5.6.conf | 17 +++++++++++++++-- .../work/data/php-fpm.conf/php-fpm-7.0.conf | 17 +++++++++++++++-- .../work/data/php-fpm.conf/php-fpm-7.1.conf | 17 +++++++++++++++-- .../work/data/php-fpm.conf/php-fpm-7.2.conf | 17 +++++++++++++++-- .../work/data/php-fpm.conf/php-fpm-7.3.conf | 17 +++++++++++++++-- build/ansible/CONFIGURATIONS/php-fpm.conf.j2 | 18 +++++++++++++++--- build/ansible/group_vars/all.yml | 3 ++- 20 files changed, 259 insertions(+), 38 deletions(-) diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.2.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.2.conf index 7daaeb75..15dc03df 100644 --- a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.2.conf +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.2.conf @@ -40,7 +40,7 @@ Set listen(2) backlog - 1024 + 128 Set permissions for unix socket, if one used. In Linux read/write permissions must be set in order to allow connections from web server. Many BSD-derrived systems allow connections regardless of permissions. diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.3.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.3.conf index 3ddf1d8d..f649cd65 100644 --- a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.3.conf +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.3.conf @@ -30,11 +30,25 @@ access.log = /proc/self/fd/2 ; ############################################################ -; Worker configuration +; Backlog configuration ; ############################################################ [www] +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. + +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = 128 + + +; ############################################################ +; Worker configuration +; ############################################################ +[www] ; static - the number of child processes is fixed (pm.max_children). ; ; dynamic - the number of child processes is set dynamically based on the following directives: @@ -116,4 +130,3 @@ group = devilbox [www] ; Ensure to listen here listen = 9000 -listen.backlog = 1024 diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.4.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.4.conf index 1d63a44e..9f1632de 100644 --- a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.4.conf +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.4.conf @@ -30,11 +30,25 @@ access.log = /proc/self/fd/2 ; ############################################################ -; Worker configuration +; Backlog configuration ; ############################################################ [www] +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. + +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = 128 + + +; ############################################################ +; Worker configuration +; ############################################################ +[www] ; static - the number of child processes is fixed (pm.max_children). ; ; dynamic - the number of child processes is set dynamically based on the following directives: @@ -118,4 +132,3 @@ group = devilbox [www] ; Ensure to listen here listen = 9000 -listen.backlog = 1024 diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.5.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.5.conf index 1d63a44e..9f1632de 100644 --- a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.5.conf +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.5.conf @@ -30,11 +30,25 @@ access.log = /proc/self/fd/2 ; ############################################################ -; Worker configuration +; Backlog configuration ; ############################################################ [www] +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. + +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = 128 + + +; ############################################################ +; Worker configuration +; ############################################################ +[www] ; static - the number of child processes is fixed (pm.max_children). ; ; dynamic - the number of child processes is set dynamically based on the following directives: @@ -118,4 +132,3 @@ group = devilbox [www] ; Ensure to listen here listen = 9000 -listen.backlog = 1024 diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.6.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.6.conf index 1d63a44e..9f1632de 100644 --- a/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.6.conf +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-5.6.conf @@ -30,11 +30,25 @@ access.log = /proc/self/fd/2 ; ############################################################ -; Worker configuration +; Backlog configuration ; ############################################################ [www] +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. + +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = 128 + + +; ############################################################ +; Worker configuration +; ############################################################ +[www] ; static - the number of child processes is fixed (pm.max_children). ; ; dynamic - the number of child processes is set dynamically based on the following directives: @@ -118,4 +132,3 @@ group = devilbox [www] ; Ensure to listen here listen = 9000 -listen.backlog = 1024 diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.0.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.0.conf index 1d63a44e..9f1632de 100644 --- a/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.0.conf +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.0.conf @@ -30,11 +30,25 @@ access.log = /proc/self/fd/2 ; ############################################################ -; Worker configuration +; Backlog configuration ; ############################################################ [www] +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. + +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = 128 + + +; ############################################################ +; Worker configuration +; ############################################################ +[www] ; static - the number of child processes is fixed (pm.max_children). ; ; dynamic - the number of child processes is set dynamically based on the following directives: @@ -118,4 +132,3 @@ group = devilbox [www] ; Ensure to listen here listen = 9000 -listen.backlog = 1024 diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.1.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.1.conf index 1d63a44e..9f1632de 100644 --- a/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.1.conf +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.1.conf @@ -30,11 +30,25 @@ access.log = /proc/self/fd/2 ; ############################################################ -; Worker configuration +; Backlog configuration ; ############################################################ [www] +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. + +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = 128 + + +; ############################################################ +; Worker configuration +; ############################################################ +[www] ; static - the number of child processes is fixed (pm.max_children). ; ; dynamic - the number of child processes is set dynamically based on the following directives: @@ -118,4 +132,3 @@ group = devilbox [www] ; Ensure to listen here listen = 9000 -listen.backlog = 1024 diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.2.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.2.conf index 1d63a44e..9f1632de 100644 --- a/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.2.conf +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.2.conf @@ -30,11 +30,25 @@ access.log = /proc/self/fd/2 ; ############################################################ -; Worker configuration +; Backlog configuration ; ############################################################ [www] +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. + +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = 128 + + +; ############################################################ +; Worker configuration +; ############################################################ +[www] ; static - the number of child processes is fixed (pm.max_children). ; ; dynamic - the number of child processes is set dynamically based on the following directives: @@ -118,4 +132,3 @@ group = devilbox [www] ; Ensure to listen here listen = 9000 -listen.backlog = 1024 diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.3.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.3.conf index 1d63a44e..9f1632de 100644 --- a/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.3.conf +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-7.3.conf @@ -30,11 +30,25 @@ access.log = /proc/self/fd/2 ; ############################################################ -; Worker configuration +; Backlog configuration ; ############################################################ [www] +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. + +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = 128 + + +; ############################################################ +; Worker configuration +; ############################################################ +[www] ; static - the number of child processes is fixed (pm.max_children). ; ; dynamic - the number of child processes is set dynamically based on the following directives: @@ -118,4 +132,3 @@ group = devilbox [www] ; Ensure to listen here listen = 9000 -listen.backlog = 1024 diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.2.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.2.conf index efd82405..c50be446 100644 --- a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.2.conf +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.2.conf @@ -40,7 +40,7 @@ Set listen(2) backlog - 1024 + 128 Set permissions for unix socket, if one used. In Linux read/write permissions must be set in order to allow connections from web server. Many BSD-derrived systems allow connections regardless of permissions. diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.3.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.3.conf index 3ddf1d8d..f649cd65 100644 --- a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.3.conf +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.3.conf @@ -30,11 +30,25 @@ access.log = /proc/self/fd/2 ; ############################################################ -; Worker configuration +; Backlog configuration ; ############################################################ [www] +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. + +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = 128 + + +; ############################################################ +; Worker configuration +; ############################################################ +[www] ; static - the number of child processes is fixed (pm.max_children). ; ; dynamic - the number of child processes is set dynamically based on the following directives: @@ -116,4 +130,3 @@ group = devilbox [www] ; Ensure to listen here listen = 9000 -listen.backlog = 1024 diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.4.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.4.conf index 1d63a44e..9f1632de 100644 --- a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.4.conf +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.4.conf @@ -30,11 +30,25 @@ access.log = /proc/self/fd/2 ; ############################################################ -; Worker configuration +; Backlog configuration ; ############################################################ [www] +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. + +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = 128 + + +; ############################################################ +; Worker configuration +; ############################################################ +[www] ; static - the number of child processes is fixed (pm.max_children). ; ; dynamic - the number of child processes is set dynamically based on the following directives: @@ -118,4 +132,3 @@ group = devilbox [www] ; Ensure to listen here listen = 9000 -listen.backlog = 1024 diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.5.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.5.conf index 1d63a44e..9f1632de 100644 --- a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.5.conf +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.5.conf @@ -30,11 +30,25 @@ access.log = /proc/self/fd/2 ; ############################################################ -; Worker configuration +; Backlog configuration ; ############################################################ [www] +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. + +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = 128 + + +; ############################################################ +; Worker configuration +; ############################################################ +[www] ; static - the number of child processes is fixed (pm.max_children). ; ; dynamic - the number of child processes is set dynamically based on the following directives: @@ -118,4 +132,3 @@ group = devilbox [www] ; Ensure to listen here listen = 9000 -listen.backlog = 1024 diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.6.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.6.conf index 1d63a44e..9f1632de 100644 --- a/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.6.conf +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-5.6.conf @@ -30,11 +30,25 @@ access.log = /proc/self/fd/2 ; ############################################################ -; Worker configuration +; Backlog configuration ; ############################################################ [www] +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. + +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = 128 + + +; ############################################################ +; Worker configuration +; ############################################################ +[www] ; static - the number of child processes is fixed (pm.max_children). ; ; dynamic - the number of child processes is set dynamically based on the following directives: @@ -118,4 +132,3 @@ group = devilbox [www] ; Ensure to listen here listen = 9000 -listen.backlog = 1024 diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.0.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.0.conf index 1d63a44e..9f1632de 100644 --- a/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.0.conf +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.0.conf @@ -30,11 +30,25 @@ access.log = /proc/self/fd/2 ; ############################################################ -; Worker configuration +; Backlog configuration ; ############################################################ [www] +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. + +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = 128 + + +; ############################################################ +; Worker configuration +; ############################################################ +[www] ; static - the number of child processes is fixed (pm.max_children). ; ; dynamic - the number of child processes is set dynamically based on the following directives: @@ -118,4 +132,3 @@ group = devilbox [www] ; Ensure to listen here listen = 9000 -listen.backlog = 1024 diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.1.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.1.conf index 1d63a44e..9f1632de 100644 --- a/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.1.conf +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.1.conf @@ -30,11 +30,25 @@ access.log = /proc/self/fd/2 ; ############################################################ -; Worker configuration +; Backlog configuration ; ############################################################ [www] +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. + +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = 128 + + +; ############################################################ +; Worker configuration +; ############################################################ +[www] ; static - the number of child processes is fixed (pm.max_children). ; ; dynamic - the number of child processes is set dynamically based on the following directives: @@ -118,4 +132,3 @@ group = devilbox [www] ; Ensure to listen here listen = 9000 -listen.backlog = 1024 diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.2.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.2.conf index 1d63a44e..9f1632de 100644 --- a/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.2.conf +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.2.conf @@ -30,11 +30,25 @@ access.log = /proc/self/fd/2 ; ############################################################ -; Worker configuration +; Backlog configuration ; ############################################################ [www] +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. + +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = 128 + + +; ############################################################ +; Worker configuration +; ############################################################ +[www] ; static - the number of child processes is fixed (pm.max_children). ; ; dynamic - the number of child processes is set dynamically based on the following directives: @@ -118,4 +132,3 @@ group = devilbox [www] ; Ensure to listen here listen = 9000 -listen.backlog = 1024 diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.3.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.3.conf index 1d63a44e..9f1632de 100644 --- a/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.3.conf +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-7.3.conf @@ -30,11 +30,25 @@ access.log = /proc/self/fd/2 ; ############################################################ -; Worker configuration +; Backlog configuration ; ############################################################ [www] +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. + +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = 128 + + +; ############################################################ +; Worker configuration +; ############################################################ +[www] ; static - the number of child processes is fixed (pm.max_children). ; ; dynamic - the number of child processes is set dynamically based on the following directives: @@ -118,4 +132,3 @@ group = devilbox [www] ; Ensure to listen here listen = 9000 -listen.backlog = 1024 diff --git a/build/ansible/CONFIGURATIONS/php-fpm.conf.j2 b/build/ansible/CONFIGURATIONS/php-fpm.conf.j2 index d4d297c6..e85b7491 100644 --- a/build/ansible/CONFIGURATIONS/php-fpm.conf.j2 +++ b/build/ansible/CONFIGURATIONS/php-fpm.conf.j2 @@ -31,11 +31,25 @@ access.log = {{ item.cfg[item.key].access_log | default(item.cfg[item.alt].acces ; ############################################################ -; Worker configuration +; Backlog configuration ; ############################################################ [www] +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. + +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = {{ item.cfg[item.key].listen_backlog | default(item.cfg[item.alt].listen_backlog) }} + + +; ############################################################ +; Worker configuration +; ############################################################ +[www] ; static - the number of child processes is fixed (pm.max_children). ; ; dynamic - the number of child processes is set dynamically based on the following directives: @@ -122,8 +136,6 @@ group = {{ item.cfg[item.key].group | default(item.cfg[item.alt].group) }} [www] ; Ensure to listen here listen = {{ item.cfg[item.key].listen | default(item.cfg[item.alt].listen)}} -{# Available since PHP >= 5.4 #} -listen.backlog = {{ item.cfg[item.key].listen_backlog | default(item.cfg[item.alt].listen_backlog) }} {% else %} {# PHP-FPM 5.2 uses XML format for configuration #} diff --git a/build/ansible/group_vars/all.yml b/build/ansible/group_vars/all.yml index 493e4c2f..91b04a58 100644 --- a/build/ansible/group_vars/all.yml +++ b/build/ansible/group_vars/all.yml @@ -95,7 +95,8 @@ php_settings_fpm: request_terminate_timeout: "{{ php_timeout }}s" # Network listen: 9000 - listen_backlog: 1024 + # Backlog + listen_backlog: 128 # Logging log_level: notice error_log: /proc/self/fd/2