Run alembic migrations in Docker CMD

Railway's releaseCommand wasn't executing, so run migrations
directly in the container startup command instead.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Michael Chihlas
2026-02-01 01:03:24 -05:00
parent 7b0788712d
commit b96cbab087

View File

@@ -18,5 +18,5 @@ COPY . .
# Expose port (Railway uses PORT env variable)
EXPOSE 8000
# Run the application - use shell form to expand $PORT
CMD uvicorn app.main:app --host 0.0.0.0 --port ${PORT:-8000}
# Run migrations then start the application
CMD alembic upgrade head && uvicorn app.main:app --host 0.0.0.0 --port ${PORT:-8000}