3 months ago
Have tried several CMD formats to expose the port, none of which have worked, all failing the healthcheck post-deployment and giving me the same error.
CMD sh -c "uvicorn backend.api.main:app --host 0.0.0.0 --port ${PORT:-8000}"
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "$PORT"]
CMD ["sh", "-c", "uvicorn backend.api.main:app --host 0.0.0.0 --port ${PORT:-8000}"]
CMD ["uvicorn", "backend.api.main:app", "--host", "0.0.0.0", "--port", "8000"]
2 Replies
3 months ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
3 months ago
Seems to be a simple issue here, Error: Invalid value for '--port': '$PORT' is not a valid integer. - can you set the command to have the port be 8080?
Status changed to Awaiting User Response Railway • 3 months ago
2 months ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 2 months ago