add ability to set php-workers/servers/children

This commit is contained in:
2018-06-07 11:46:47 +02:00
parent 1a6bfd4039
commit 75b811dac0
9 changed files with 40 additions and 8 deletions

View File

@ -6,7 +6,11 @@ ARG GPG_matthieu="814E 346F A01A 20DB B04B 6807 B5DB D592 5590 A237"
ENV UID=991 GID=991 \
UPLOAD_MAX_SIZE=10M \
MEMORY_LIMIT=256M \
OPCACHE_MEM_SIZE=128M
OPCACHE_MEM_SIZE=128M \
PHP_MAX_CHILDREN=15 \
PHP_START_SERVERS=2 \
PHP_MIN_SPARE_SERVERS=1 \
PHP_MAX_SPARE_SERVERS=6
RUN BUILD_DEPS=" \
git \

View File

@ -1,7 +1,11 @@
#!/bin/sh
sed -i -e "s/<UPLOAD_MAX_SIZE>/$UPLOAD_MAX_SIZE/g" /nginx/conf/nginx.conf /php/etc/php-fpm.conf \
-e "s/<MEMORY_LIMIT>/$MEMORY_LIMIT/g" /php/etc/php-fpm.conf \
-e "s/<OPCACHE_MEM_SIZE>/$OPCACHE_MEM_SIZE/g" /php/conf.d/opcache.ini
-e "s/<OPCACHE_MEM_SIZE>/$OPCACHE_MEM_SIZE/g" /php/conf.d/opcache.ini \
-e "s/<PHP_MAX_CHILDREN>/$PHP_MAX_CHILDREN/g" /php/etc/php-fpm.conf \
-e "s/<PHP_START_SERVERS>/$PHP_START_SERVERS/g" /php/etc/php-fpm.conf \
-e "s/<PHP_MIN_SPARE_SERVERS>/$PHP_MIN_SPARE_SERVERS/g" /php/etc/php-fpm.conf \
-e "s/<PHP_MAX_SPARE_SERVERS>/$PHP_MAX_SPARE_SERVERS/g" /php/etc/php-fpm.conf
if [ ! -f /config/config.ini.php ]; then
cp /matomo/config/config.ini.php /config/config.ini.php