Merge pull request #807 from benbrummer/octane

Optimize artisan commands
This commit is contained in:
David Bomba
2025-09-29 08:09:36 +10:00
committed by GitHub
2 changed files with 15 additions and 16 deletions

2
debian/Dockerfile vendored
View File

@@ -92,7 +92,7 @@ COPY --chmod=0755 scripts/init.sh /usr/local/bin/init.sh
USER ${user}
HEALTHCHECK --start-period=10s CMD curl -f http://localhost/health
HEALTHCHECK --start-period=100s CMD curl -f http://localhost/health
ENTRYPOINT ["/usr/local/bin/init.sh"]

View File

@@ -53,13 +53,11 @@ if [ "$*" = 'frankenphp php-cli artisan octane:frankenphp' ] || [ "${1#-}" != "$
[ -d /app/storage/logs ] || mkdir -p /app/storage/logs
if [ "$APP_ENV" = "production" ]; then
frankenphp php-cli artisan optimize
fi
frankenphp php-cli artisan package:discover
# Run migrations (if any)
frankenphp php-cli artisan migrate --force
frankenphp php-cli artisan cache:clear # Clear after the migration
frankenphp php-cli artisan ninja:design-update
frankenphp php-cli artisan optimize
# If first IN run, it needs to be initialized
if [ "$(frankenphp php-cli artisan tinker --execute='echo Schema::hasTable("accounts") && !App\Models\Account::all()->first();')" = "1" ]; then
@@ -74,6 +72,7 @@ if [ "$*" = 'frankenphp php-cli artisan octane:frankenphp' ] || [ "${1#-}" != "$
exit 1
fi
fi
fi
echo "Production setup completed"
# Run worker