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
All checks were successful
Deploy to Production / deploy (push) Successful in 47s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user