diff --git a/docker/init-docker b/docker/init-docker index 621bc78..97870c6 100755 --- a/docker/init-docker +++ b/docker/init-docker @@ -46,6 +46,13 @@ if [ -x /usr/bin/memcached -a "${MEMCACHED_START}" == "TRUE" ]; then /usr/bin/memcached -d -P /run/memcached/memcached.pid -u memcached fi +# If we are local, then disable the opcache +if [ "${ENV}" != "production" -a ! -e ${PHP_DIR}/pprepend.php ]; then + echo "* Automatically disabling opcache as environment is not production [${ENV}]" + echo " ${PHP_DIR}/prepend.php + sed -i -e s"#auto_prepend_file =#auto_prepend_file=${PHP_DIR}/prepend.php#" /usr/local/etc/php/php.ini +fi + # Laravel Specific if [ -r artisan -a -e ${php}/.env ]; then echo "* Laravel Setup..."