Enable creation of prepend.php and automatically disable opcache
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 3m27s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 16m48s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s
Create Docker Image / Build Docker Test Image (x86_64) (push) Successful in 55s
Create Docker Image / Final Docker Test Image Manifest (push) Successful in 11s

This commit is contained in:
Deon George 2025-02-13 23:44:00 +11:00
parent aeb3c72c04
commit 3abf993607

View File

@ -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 ini_set('opcache.enable',false);" > ${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..."