Service Fails to Deploy - Not Receiving $PORT Environment Variable
risingphoenixpodcast
HOBBYOP

a year ago

Hello,

My Python FastAPI service (points-api) is consistently failing to deploy correctly because it is not receiving the standard $PORT environment variable.

My application log proves that it is defaulting to port 8080 and is then being shut down by your platform's health checker. The log shows: INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)

I have confirmed my Start Command is python api_main.py and my application code correctly reads the port from the environment using os.environ.get('PORT'). The logs confirm this variable is not being injected into my container's environment.

Can you please investigate why my service is not receiving the $PORT variable?

Thank you.

1 Replies

a year ago

Apologies but this looks like an issue with the application level code. Due to volume, we can only answer platform level issues.

I've made this thread public so that the community might be able to help with you query.


Status changed to Awaiting User Response Railway 11 months ago


a year ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open jake 11 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...