You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also remove the custom start command from the Railway dashboard if one is set there — railway.toml takes precedence when deployed via Dockerfile builder.
Fix Railway deploys by wrapping the startCommand in sh -c so $PORT expands at runtime. Uvicorn now binds to the platform-assigned port instead of a hardcoded value.
Migration
If a custom start command exists in the Railway dashboard, remove it. railway.toml is used for Dockerfile builds.
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request updates the railway.toml configuration to use the $PORT environment variable for the uvicorn server instead of a hardcoded value. The review feedback suggests using exec to ensure the application correctly receives termination signals and providing a default value for the port variable to improve reliability.
The reason will be displayed to describe this comment to others. Learn more.
To ensure that the application receives termination signals (like SIGTERM) correctly and to provide a fallback port if the $PORT environment variable is missing, consider using exec and a default value for the port. This also maintains consistency with the implementation in the Dockerfile.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Railway does not shell-interpolate env vars in
startCommand—$PORTwas passed literally to uvicorn, which rejected it as a non-integer.Fix: wrap in
sh -c '...'so the shell expands$PORTbefore uvicorn sees it.Also remove the custom start command from the Railway dashboard if one is set there —
railway.tomltakes precedence when deployed via Dockerfile builder.https://claude.ai/code/session_017cLXjZu6kkjXRf2BemMPpp
Generated by Claude Code
Summary by cubic
Fix Railway deploys by wrapping the
startCommandinsh -cso$PORTexpands at runtime. Uvicorn now binds to the platform-assigned port instead of a hardcoded value.railway.tomlis used for Dockerfile builds.Written for commit 5f4bbe6. Summary will update on new commits. Review in cubic