Set OPcache's revalidation frequency to 0 seconds for development.

This commit is contained in:
Michael Stenta 2020-08-20 16:02:24 -04:00
parent 85e0fab939
commit c4ddf812bd
1 changed files with 4 additions and 0 deletions

View File

@ -17,6 +17,10 @@ ARG PROJECT_VERSION=2.x
ARG WWW_DATA_ID=1000
RUN usermod -u ${WWW_DATA_ID} www-data && groupmod -g ${WWW_DATA_ID} www-data
# Set OPcache's revalidation frequency to 0 seconds for development.
# See https://www.php.net/manual/en/opcache.configuration.php#ini.opcache.revalidate-freq
RUN sed -i 's|opcache.revalidate_freq=60|opcache.revalidate_freq=0|g' /usr/local/etc/php/conf.d/opcache-recommended.ini
# Install and configure XDebug.
RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \