From 9dabc2076bc45a3339ba14c1bcf3485ae276191f Mon Sep 17 00:00:00 2001 From: Sascha Heilmeier Date: Fri, 11 Oct 2024 09:17:26 +0200 Subject: [PATCH] feat: make opcache.preload configureabe throug env --- php/8.2.Dockerfile | 1 + php/Dockerfile | 1 + php/config/conf.d/99-php.ini | 2 ++ 3 files changed, 4 insertions(+) diff --git a/php/8.2.Dockerfile b/php/8.2.Dockerfile index 454c745..bfdb7d6 100644 --- a/php/8.2.Dockerfile +++ b/php/8.2.Dockerfile @@ -17,6 +17,7 @@ ENV PHP_VERSION=${PHP_VERSION} \ PHP_UPLOAD_MAX_FILESIZE=100M \ PHP_OPCACHE_ENABLE_FILE_OVERRIDE=0 \ PHP_OPCACHE_INTERNED_STRINGS_BUFFER=8 \ + PHP_OPCACHE_PRELOAD_USER=www-data \ PHP_REALPATH_CACHE_TTL=512 \ PHP_XDEBUG_HOST=host.docker.internal \ PHP_XDEBUG_MODE=off \ diff --git a/php/Dockerfile b/php/Dockerfile index 8ef9a74..6a32d2c 100644 --- a/php/Dockerfile +++ b/php/Dockerfile @@ -17,6 +17,7 @@ ENV PHP_VERSION=${PHP_VERSION} \ PHP_UPLOAD_MAX_FILESIZE=100M \ PHP_OPCACHE_ENABLE_FILE_OVERRIDE=0 \ PHP_OPCACHE_INTERNED_STRINGS_BUFFER=8 \ + PHP_OPCACHE_PRELOAD_USER=www-data \ PHP_REALPATH_CACHE_TTL=512 \ PHP_XDEBUG_HOST=host.docker.internal \ PHP_XDEBUG_MODE=off \ diff --git a/php/config/conf.d/99-php.ini b/php/config/conf.d/99-php.ini index 4f26d07..7a75b09 100644 --- a/php/config/conf.d/99-php.ini +++ b/php/config/conf.d/99-php.ini @@ -8,6 +8,8 @@ upload_max_filesize = ${PHP_UPLOAD_MAX_FILESIZE} max_input_vars = ${PHP_MAX_INPUT_VARS} opcache.enable_file_override = ${PHP_OPCACHE_ENABLE_FILE_OVERRIDE} opcache.interned_strings_buffer = ${PHP_OPCACHE_INTERNED_STRINGS_BUFFER} +opcache.preload = ${PHP_OPCACHE_PRELOAD} +opcache.preload_user=${PHP_OPCACHE_PRELOAD_USER} zend.assertions = ${PHP_ASSERT} zend.detect_unicode = 0 realpath_cache_ttl = ${PHP_REALPATH_CACHE_TTL}