From b96cbab087202aa6ea295a8817adb33cb2b1ccbf Mon Sep 17 00:00:00 2001 From: Michael Chihlas Date: Sun, 1 Feb 2026 01:03:24 -0500 Subject: [PATCH] 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 --- backend/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 708d6c3f..0bccd57a 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -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}