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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@ COPY root /

VOLUME ["/var/log/httpd", "/var/lib/php/session"]

ENV PROXY_TIMEOUT 120
ENV PHP_MAX_EXECUTION_TIME 60
ENV PHP_MAX_CHILDREN 5
ENV PHP_MEMORY_LIMIT 256m
ENV PHP_OPCACHE_MEMORY 192
ENV PHP_XDEBUG false
ENV PHP_XHPROF false
ENV PHP_TIMEZONE UTC
ENV PHP_POST_MAX_SIZE 12M
ENV PHP_UPLOAD_MAX_FILESIZE 10M
ENV DOCROOT /var/www/html
ENV PROXY_TIMEOUT 120
ENV PHP_MAX_EXECUTION_TIME 60
ENV PHP_MAX_CHILDREN 5
ENV PHP_MEMORY_LIMIT 256m
ENV PHP_OPCACHE_MEMORY 192
ENV PHP_XDEBUG false
ENV PHP_XHPROF false
ENV PHP_TIMEZONE UTC
ENV PHP_POST_MAX_SIZE 12M
ENV PHP_UPLOAD_MAX_FILESIZE 10M
ENV DOCROOT /var/www/html
ENV PHPFPM_START_SERVERS 5
ENV PHPFPM_MIN_SPARE_SERVERS 5
ENV PHPFPM_MAX_SPARE_SERVERS 35
ENV PHPFPM_MAX_REQUESTS 200
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ configurations offered by this image.
* `PHP_YAML`: [`"false"`|`"true"`] A string literal to enable PHP YAML extension.
Defaults to `"false"`.
* `PROXY_TIMEOUT`: [`120`] Apache `ProxySet timeout` value for the php-fpm proxy.
* `PHPFPM_START_SERVERS`: [`5`] `Start Servers` The number of child processes created on startup.
* `PHPFPM_MIN_SPARE_SERVERS`: [`5`] `Min Spare Servers` The desired minimum number of idle server processes.
* `PHPFPM_MAX_SPARE_SERVERS`: [`35`] `Max Spare Servers` The desired maximum number of idle server processes.
* `PHPFPM_MAX_REQUESTS`: [`200`] `Max Request` The number of requests each child process should execute before respawning.


## Security Reports

Expand Down
8 changes: 4 additions & 4 deletions root/etc/confd/templates/www.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -73,23 +73,23 @@ pm.max_children = {{getenv "PHP_MAX_CHILDREN"}}
; The number of child processes created on startup.
; Note: Used only when pm is set to 'dynamic'
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
;pm.start_servers = 5
pm.start_servers = {{getenv "PHPFPM_START_SERVERS"}}

; The desired minimum number of idle server processes.
; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic'
;pm.min_spare_servers = 5
pm.min_spare_servers = {{getenv "PHPFPM_MIN_SPARE_SERVERS"}}

; The desired maximum number of idle server processes.
; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic'
;pm.max_spare_servers = 35
pm.max_spare_servers = {{getenv "PHPFPM_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 = 200
pm.max_requests = {{getenv "PHPFPM_MAX_REQUESTS"}}

; The URI to view the FPM status page. If this value is not set, no URI will be
; recognized as a status page. By default, the status page shows the following
Expand Down