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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user