feat: improve PHP config (#266)
* feat: improve PHP config Tweak PHP config according to Blackfire's recommendation. * Update docker/php/conf.d/symfony.prod.ini Co-authored-by: Jacob Dreesen <jacob@hdreesen.de> * fix * fix Co-authored-by: Jacob Dreesen <jacob@hdreesen.de>
This commit is contained in:
parent
4eebb98ba0
commit
daef1cb0d5
@ -58,7 +58,7 @@ RUN chmod +x /usr/local/bin/docker-healthcheck
|
||||
|
||||
HEALTHCHECK --interval=10s --timeout=3s --retries=3 CMD ["docker-healthcheck"]
|
||||
|
||||
RUN ln -s $PHP_INI_DIR/php.ini-production $PHP_INI_DIR/php.ini
|
||||
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
||||
COPY docker/php/conf.d/symfony.prod.ini $PHP_INI_DIR/conf.d/symfony.ini
|
||||
|
||||
COPY docker/php/php-fpm.d/zz-docker.conf /usr/local/etc/php-fpm.d/zz-docker.conf
|
||||
|
@ -1,11 +1,13 @@
|
||||
apc.enable_cli = 1
|
||||
expose_php = 0
|
||||
date.timezone = UTC
|
||||
session.auto_start = Off
|
||||
short_open_tag = Off
|
||||
apc.enable_cli = 1
|
||||
session.use_strict_mode = 1
|
||||
zend.detect_unicode = 0
|
||||
|
||||
# http://symfony.com/doc/current/performance.html
|
||||
# https://symfony.com/doc/current/performance.html
|
||||
realpath_cache_size = 4096K
|
||||
realpath_cache_ttl = 600
|
||||
opcache.interned_strings_buffer = 16
|
||||
opcache.max_accelerated_files = 20000
|
||||
opcache.memory_consumption = 256
|
||||
realpath_cache_size = 4096K
|
||||
realpath_cache_ttl = 600
|
||||
opcache.enable_file_override = 1
|
||||
|
@ -1,15 +1,15 @@
|
||||
apc.enable_cli = 1
|
||||
expose_php = 0
|
||||
date.timezone = UTC
|
||||
session.auto_start = Off
|
||||
short_open_tag = Off
|
||||
expose_php = Off
|
||||
apc.enable_cli = 1
|
||||
session.use_strict_mode = 1
|
||||
zend.detect_unicode = 0
|
||||
|
||||
# https://symfony.com/doc/current/performance.html
|
||||
realpath_cache_size = 4096K
|
||||
realpath_cache_ttl = 600
|
||||
opcache.interned_strings_buffer = 16
|
||||
opcache.max_accelerated_files = 20000
|
||||
opcache.memory_consumption = 256
|
||||
opcache.validate_timestamps = 0
|
||||
realpath_cache_size = 4096K
|
||||
realpath_cache_ttl = 600
|
||||
opcache.preload_user = www-data
|
||||
opcache.preload = /srv/app/config/preload.php
|
||||
opcache.enable_file_override = 1
|
||||
opcache.preload_user=www-data
|
||||
opcache.preload=/srv/app/config/preload.php
|
||||
|
@ -7,11 +7,9 @@ if [ "${1#-}" != "$1" ]; then
|
||||
fi
|
||||
|
||||
if [ "$1" = 'php-fpm' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
|
||||
PHP_INI_RECOMMENDED="$PHP_INI_DIR/php.ini-production"
|
||||
if [ "$APP_ENV" != 'prod' ]; then
|
||||
PHP_INI_RECOMMENDED="$PHP_INI_DIR/php.ini-development"
|
||||
ln -sf "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
|
||||
fi
|
||||
ln -sf "$PHP_INI_RECOMMENDED" "$PHP_INI_DIR/php.ini"
|
||||
|
||||
mkdir -p var/cache var/log
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user