Commit 13b485e0 authored by Mahmoud Aglan's avatar Mahmoud Aglan

Make entrypoint resilient to migration failures

If migrations fail (e.g. table ownership mismatch), log a helpful
fix command and continue startup instead of crashing the container.
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 12cedf70
...@@ -49,7 +49,11 @@ php artisan view:cache ...@@ -49,7 +49,11 @@ php artisan view:cache
php artisan event:cache php artisan event:cache
# Run pending migrations # Run pending migrations
php artisan migrate --force --no-interaction php artisan migrate --force --no-interaction || {
echo "==> WARN: Migration failed. If 'Insufficient privilege', ensure DB_USERNAME owns all tables."
echo "==> Fix: psql -U postgres -d \$DB_DATABASE -c \"REASSIGN OWNED BY old_owner TO \$DB_USERNAME;\""
echo "==> Continuing startup..."
}
# First-deploy seeding (one-click install) # First-deploy seeding (one-click install)
if [ "$RUN_SEED_ON_FIRST_DEPLOY" = "true" ]; then if [ "$RUN_SEED_ON_FIRST_DEPLOY" = "true" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment