Skip to content
Permalink
Browse files

env: Added OPcache to increase performance.

  • Loading branch information...
tarlepp committed Jul 28, 2019
1 parent d3f5860 commit 67ff09cebb1c13f4e749b84aca75a5b1820aa282
Showing with 30 additions and 1 deletion.
  1. +1 −0 Dockerfile
  2. +2 −1 Dockerfile_dev
  3. +12 −0 docker/php/php-dev.ini
  4. +15 −0 docker/php/php.ini
@@ -10,6 +10,7 @@ RUN docker-php-ext-install -j$(nproc) bcmath \
&& docker-php-ext-install pdo_mysql \
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl \
&& docker-php-ext-install opcache \
&& docker-php-ext-install zip

# copy the Composer PHAR from the Composer image into the PHP image
@@ -13,9 +13,10 @@ RUN apt-get update && apt-get install -y \
RUN docker-php-ext-install -j$(nproc) bcmath \
&& docker-php-ext-install pdo \
&& docker-php-ext-install pdo_mysql \
&& docker-php-ext-install zip \
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl \
&& docker-php-ext-install opcache \
&& docker-php-ext-install zip \
&& pecl install xdebug-2.7.1 \
&& docker-php-ext-enable xdebug

@@ -1,3 +1,15 @@
expose_php=off
memory_limit=1024M
short_open_tag=off

; maximum memory that OPcache can use to store compiled PHP files
opcache.memory_consumption=256

; maximum number of files that can be stored in the cache
opcache.max_accelerated_files=20000

; maximum memory allocated to store the results
realpath_cache_size=4096K

; save the results for 10 minutes (600 seconds)
realpath_cache_ttl=600
@@ -1,3 +1,18 @@
expose_php=off
memory_limit=256M
short_open_tag=off

; maximum memory that OPcache can use to store compiled PHP files
opcache.memory_consumption=256

; maximum number of files that can be stored in the cache
opcache.max_accelerated_files=20000

; in production we don't want to check file timestamps
opcache.validate_timestamps=0

; maximum memory allocated to store the results
realpath_cache_size=4096K

; save the results for one hour (3600 seconds)
realpath_cache_ttl=3600

0 comments on commit 67ff09c

Please sign in to comment.
You can’t perform that action at this time.