fix(ci): reset stale DB volume, skip create_all in prod, handle alembic stamp fallback
All checks were successful
Deploy to Production / deploy (push) Successful in 47s

This commit is contained in:
Johngreen
2026-02-10 12:46:49 +09:00
parent 6b7a2f2b26
commit eb3dd0a4ab
4 changed files with 10 additions and 3 deletions

View File

@@ -1,11 +1,13 @@
#!/bin/sh
set -e
echo "Running Alembic migrations..."
python -m alembic upgrade head
python -m alembic upgrade head 2>&1 || {
echo "Migration failed, stamping current state..."
python -m alembic stamp head 2>&1
}
echo "Running seed data..."
python scripts/seed.py
python scripts/seed.py 2>&1 || echo "Seed skipped (may already exist)"
echo "Starting uvicorn..."
exec uvicorn main:app --host 0.0.0.0 --port 8000