fix: run alembic migration in one-shot container before backend start
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m1s

- Use 'docker compose run --rm backend alembic upgrade head' to run
  migration in a throwaway container (doesn't need backend running)
- Restore entrypoint migration fallback (don't block startup)
- Restart backend after migration to pick up schema changes
- Remove --no-cache (too slow, was causing timeouts)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-17 09:59:20 +02:00
parent f409ccc647
commit 392418c3f9
2 changed files with 8 additions and 6 deletions

View File

@@ -42,8 +42,7 @@ except:
# Run database migrations
echo "📦 Running database migrations..."
alembic upgrade head
echo "✅ Migrations applied successfully"
alembic upgrade head || echo "⚠️ Migration skipped (may already be up to date)"
fi
# Wait for Redis if configured