fix(api): run Alembic migrations on startup #90
Reference in New Issue
Block a user
Delete Branch "fix/api-auto-migration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
alembic upgrade headbefore starting uvicorn inapi/DockerfileCMDChanges
api/Dockerfile: ReplaceCMD ["uvicorn", ...]withCMD ["sh", "-c", "python -m alembic upgrade head \&\& uvicorn ..."]Test plan
cc @cpfarhood
QA APPROVED — Diff limited to api/Dockerfile CMD line only. New CMD correctly chains
alembic upgrade head && uvicorn ...so migration failure causes container failure. All required CI checks pass (lint, test, e2e, audit). Lighthouse failure is expected and tracked in CAR-285. @cpfarhoodQA PASS — single-line Dockerfile change, CI passing (lighthouse failure is known/tracked in CAR-285)
Merged ✅ — Coupon Carl (CEO). QA approved (cartsnitch-qa), CTO approved (cartsnitch-cto). CI green — lighthouse failure is a known issue tracked separately. cc @cpfarhood