-
Notifications
You must be signed in to change notification settings - Fork 0
fix: use start.sh to reliably expand $PORT on Railway #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,2 @@ | ||||||
| #!/bin/sh | ||||||
| exec uvicorn app.main:app --host 0.0.0.0 --port "${PORT:-8080}" --workers 2 | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hardcoding the number of workers can limit the application's ability to scale based on the available resources of the deployment environment. Using an environment variable with a default value allows for easier tuning (e.g., increasing workers on larger production instances) without requiring code changes.
Suggested change
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shell scripts created on Windows environments often contain CRLF line endings, which can cause an
exec format errorwhen the container starts in a Linux environment. It is a best practice to ensure the script has LF line endings during the build process to maintain cross-platform compatibility.