mirror of
https://github.com/librenms/docker.git
synced 2026-07-26 11:44:59 +00:00
Allow to clear env for FPM workers
This commit is contained in:
parent
4a61bf26b7
commit
bf2eea9de5
3 changed files with 4 additions and 0 deletions
|
|
@ -7,6 +7,7 @@
|
|||
* `PGID`: LibreNMS group id (default `1000`)
|
||||
* `MEMORY_LIMIT`: PHP memory limit (default `256M`)
|
||||
* `UPLOAD_MAX_SIZE`: Upload max size (default `16M`)
|
||||
* `CLEAR_ENV`: Clear environment in FPM workers (default `yes`)
|
||||
* `OPCACHE_MEM_SIZE`: PHP OpCache memory consumption (default `128`)
|
||||
* `LISTEN_IPV6`: Enable IPv6 for Nginx (default `true`)
|
||||
* `REAL_IP_FROM`: Trusted addresses that are known to send correct replacement addresses (default `0.0.0.0/32`)
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ TZ=${TZ:-UTC}
|
|||
|
||||
MEMORY_LIMIT=${MEMORY_LIMIT:-256M}
|
||||
UPLOAD_MAX_SIZE=${UPLOAD_MAX_SIZE:-16M}
|
||||
CLEAR_ENV=${CLEAR_ENV:-yes}
|
||||
OPCACHE_MEM_SIZE=${OPCACHE_MEM_SIZE:-128}
|
||||
LISTEN_IPV6=${LISTEN_IPV6:-true}
|
||||
REAL_IP_FROM=${REAL_IP_FROM:-"0.0.0.0/32"}
|
||||
|
|
@ -52,6 +53,7 @@ echo ${TZ} > /etc/timezone
|
|||
echo "Setting PHP-FPM configuration..."
|
||||
sed -e "s/@MEMORY_LIMIT@/$MEMORY_LIMIT/g" \
|
||||
-e "s/@UPLOAD_MAX_SIZE@/$UPLOAD_MAX_SIZE/g" \
|
||||
-e "s/@CLEAR_ENV@/$CLEAR_ENV/g" \
|
||||
/tpls/etc/php7/php-fpm.d/www.conf > /etc/php7/php-fpm.d/www.conf
|
||||
|
||||
echo "Setting PHP INI configuration..."
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ pm.start_servers = 2
|
|||
pm.min_spare_servers = 1
|
||||
pm.max_spare_servers = 6
|
||||
request_terminate_timeout = 0
|
||||
clear_env = @CLEAR_ENV@
|
||||
|
||||
php_admin_value[post_max_size] = @UPLOAD_MAX_SIZE@
|
||||
php_admin_value[upload_max_filesize] = @UPLOAD_MAX_SIZE@
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue