diff --git a/Dockerfile b/Dockerfile index dd82831..78ef0dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -106,6 +106,7 @@ ARG GID ENV UPLOAD_MAX_SIZE=10G \ APC_SHM_SIZE=128M \ OPCACHE_MEM_SIZE=128 \ + OPCACHE_STRING_BUFFER_SIZE=16 \ MEMORY_LIMIT=512M \ CRON_PERIOD=5m \ CRON_MEMORY_LIMIT=1g \ diff --git a/README.md b/README.md index 8ba8207..51a1209 100644 --- a/README.md +++ b/README.md @@ -91,17 +91,18 @@ For convenience they were put at [the very top of the Dockerfile](https://github ### Runtime -| Variable | Description | Default | -| ------------------------- | --------------------------- | ------------------ | -| **UPLOAD_MAX_SIZE** | file upload maximum size | 10G | -| **APC_SHM_SIZE** | apc shared memory size | 128M | -| **OPCACHE_MEM_SIZE** | opcache available memory | 128M | -| **MEMORY_LIMIT** | max php command mem usage | 512M | -| **CRON_PERIOD** | cron time interval (min.) | 5m | -| **CRON_MEMORY_LIMIT** | cron max memory usage | 1G | -| **DB_TYPE** | sqlite3, mysql, pgsql | sqlite3 | -| **DOMAIN** | host domain | localhost | -| **PHP_HARDENING** | enables snuffleupagus | true | +| Variable | Description | Default | +| --------------------------------- | --------------------------- | ------------------ | +| **UPLOAD_MAX_SIZE** | file upload maximum size | 10G | +| **APC_SHM_SIZE** | apc shared memory size | 128M | +| **OPCACHE_MEM_SIZE** | opcache available memory | 128M | +| **OPCACHE_STRING_BUFFER_SIZE** | opcache string buffer size | 16M | +| **MEMORY_LIMIT** | max php command mem usage | 512M | +| **CRON_PERIOD** | cron time interval (min.) | 5m | +| **CRON_MEMORY_LIMIT** | cron max memory usage | 1G | +| **DB_TYPE** | sqlite3, mysql, pgsql | sqlite3 | +| **DOMAIN** | host domain | localhost | +| **PHP_HARDENING** | enables snuffleupagus | true | Leave them at default if you're not sure what you're doing. diff --git a/rootfs/usr/local/bin/run.sh b/rootfs/usr/local/bin/run.sh index 45a15ed..64a0bd2 100644 --- a/rootfs/usr/local/bin/run.sh +++ b/rootfs/usr/local/bin/run.sh @@ -3,6 +3,7 @@ # Apply environment variables settings sed -i -e "s//$APC_SHM_SIZE/g" /usr/local/etc/php/conf.d/apcu.ini \ -e "s//$OPCACHE_MEM_SIZE/g" /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini \ + -e "s//$OPCACHE_STRING_BUFFER_SIZE/g" /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini \ -e "s//$CRON_MEMORY_LIMIT/g" /etc/s6.d/cron/run \ -e "s//$CRON_PERIOD/g" /etc/s6.d/cron/run \ -e "s//$MEMORY_LIMIT/g" /usr/local/bin/occ \ diff --git a/rootfs/usr/local/etc/php/conf.d/docker-php-ext-opcache.ini b/rootfs/usr/local/etc/php/conf.d/docker-php-ext-opcache.ini index c855e11..5d06c65 100644 --- a/rootfs/usr/local/etc/php/conf.d/docker-php-ext-opcache.ini +++ b/rootfs/usr/local/etc/php/conf.d/docker-php-ext-opcache.ini @@ -3,7 +3,7 @@ opcache.enable=1 opcache.enable_cli=1 opcache.fast_shutdown=1 opcache.memory_consumption= -opcache.interned_strings_buffer=16 +opcache.interned_strings_buffer= opcache.max_accelerated_files=10000 opcache.revalidate_freq=60 opcache.jit=disable