aio-interface: enable PHP OPcache and Twig template cache (#7950)

This commit is contained in:
Simon L.
2026-04-20 13:55:33 +02:00
committed by GitHub
3 changed files with 20 additions and 3 deletions

View File

@@ -53,6 +53,14 @@ RUN set -ex; \
build-base; \
pecl install APCu-5.1.28; \
docker-php-ext-enable apcu; \
docker-php-ext-enable opcache; \
{ \
echo 'opcache.enable=1'; \
echo 'opcache.memory_consumption=32'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=4000'; \
echo 'opcache.validate_timestamps=0'; \
} >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini; \
rm -r /tmp/pear; \
runDeps="$( \
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \

View File

@@ -423,5 +423,11 @@ caddy fmt --overwrite /internal.Caddyfile
# Fix caddy log
chmod 777 /root
# Create Twig template cache directory (path must match TWIG_CACHE_PATH in php/public/index.php)
mkdir -p /tmp/twig-cache
rm -rf /tmp/twig-cache/*
chown www-data:www-data /tmp/twig-cache
chmod 770 /tmp/twig-cache
# Start supervisord
exec /usr/bin/supervisord -c /supervisord.conf