diff --git a/doc/docker/fpm/entrypoint.sh b/doc/docker/fpm/entrypoint.sh index e10cadb509..2af20757f3 100755 --- a/doc/docker/fpm/entrypoint.sh +++ b/doc/docker/fpm/entrypoint.sh @@ -1,8 +1,16 @@ #!/bin/bash set -e +# if EGW_APC_SHM_SIZE is set in environment, propagate value to apcu.ini +test -n "$EGW_APC_SHM_SIZE" && { + grep "apc.shm_size" /etc/php/7.3/fpm/conf.d/20-apcu.ini >/dev/null && \ + sed -e "s/^;\?apc.shm_size.*/apc.shm_size=$EGW_APC_SHM_SIZE/g" \ + -i /etc/php/7.3/fpm/conf.d/20-apcu.ini || \ + echo "apc.shm_size=$EGW_APC_SHM_SIZE" >> /etc/php/7.3/fpm/conf.d/20-apcu.ini \ +} + # if EGW_SESSION_TIMEOUT is set in environment, propagate value to php.ini -test -n "$EGW_SESSION_TIMEOUT" && test "$EGW_SESSION_TIMEOUT" -ge 1440 && +test -n "$EGW_SESSION_TIMEOUT" && test "$EGW_SESSION_TIMEOUT" -ge 1440 && \ sed -e "s/^;\?session.gc_maxlifetime.*/session.gc_maxlifetime=$EGW_SESSION_TIMEOUT/g" \ -i /etc/php/7.3/fpm/php.ini