From 977e2001f02707e4a6e6cb7df98ce0b40d7e8ee0 Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Mon, 13 Jan 2025 12:19:01 +0000 Subject: [PATCH] disable preload for artisan tinker --- alpine/5/rootfs/usr/local/bin/invoiceninja-init.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alpine/5/rootfs/usr/local/bin/invoiceninja-init.sh b/alpine/5/rootfs/usr/local/bin/invoiceninja-init.sh index b4b2ee5..f4a21ba 100755 --- a/alpine/5/rootfs/usr/local/bin/invoiceninja-init.sh +++ b/alpine/5/rootfs/usr/local/bin/invoiceninja-init.sh @@ -30,7 +30,7 @@ php artisan optimize php artisan package:discover # Check if DB works, if not crash the app. -DB_READY=$(php artisan tinker --execute='echo app()->call("App\Utils\SystemHealth@dbCheck")["success"];') +DB_READY=$(php -d opcache.preload='' artisan tinker --execute='echo app()->call("App\Utils\SystemHealth@dbCheck")["success"];') if [ "$DB_READY" != "1" ]; then php artisan migrate:status # Print verbose error in_error "Error connecting to DB" @@ -39,7 +39,7 @@ fi php artisan migrate --force # If first IN run, it needs to be initialized -IN_INIT=$(php artisan tinker --execute='echo Schema::hasTable("accounts") && !App\Models\Account::all()->first();') +IN_INIT=$(php -d opcache.preload='' artisan tinker --execute='echo Schema::hasTable("accounts") && !App\Models\Account::all()->first();') if [ "$IN_INIT" == "1" ]; then docker_process_init_files /docker-entrypoint-init.d/* fi