From d789178e1e8e889cde6b5b5d6eccd9c92b041bc1 Mon Sep 17 00:00:00 2001 From: Deon George Date: Thu, 13 Feb 2025 23:44:00 +1100 Subject: [PATCH] Enable creation of prepend.php and automatically disable opcache --- docker/init-docker | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker/init-docker b/docker/init-docker index 621bc78..79f8553 100755 --- a/docker/init-docker +++ b/docker/init-docker @@ -46,6 +46,12 @@ 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 " ${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..."