Cannot run fast-api service with uvicorn
michaurbanczyk
HOBBYOP

a year ago

Hi!

I have my project where I am deploying fast-api service with websockets. By default it was deployed with gunicorn command but unfortunately websockets are not working. I changed deploy command and port in networking to 8000 so I have:

uvicorn main.app:app --host 0.0.0.0 --port 8000

but right now service started and then after few seconds is finished.

Will be very thankful for your help!

Best regards,

Michal

Solved

5 Replies

itsrems
EMPLOYEE

a year ago

Looks like you're sorted! I'm gonna close this out, but please feel free to re-open this thread or make a new one if there's additional issues!


Status changed to Awaiting User Response Railway 11 months ago


Status changed to Solved itsrems 11 months ago


Status changed to Awaiting Railway Response michaurbanczyk 11 months ago


itsrems

Looks like you're sorted! I'm gonna close this out, but please feel free to re-open this thread or make a new one if there's additional issues!

michaurbanczyk
HOBBYOP

a year ago

Hey! Not sure why it was marked as solved. It is not frowning_face emoji I am still facing the issue and your help would be appreciated! Thank you!


itsrems
EMPLOYEE

a year ago

Your app is running and reachable


Status changed to Awaiting User Response Railway 11 months ago


michaurbanczyk
HOBBYOP

a year ago

You are right, it works! If anybody face the same issue what I have done is I changed custom start command to:

uvicorn app.main:app --host 0.0.0.0 --port 8000

and in public networking I have added port 8000:

I am not sure why it was not working preliminary but right now it is perfect slightly_smiling_face emoji Thank you!


Status changed to Awaiting Railway Response Railway 11 months ago


Thank you for sharing! Going to mark this as solved so others can pop in and use your solution if they run into this in the future slightly_smiling_face emoji


Status changed to Awaiting User Response Railway 11 months ago


Status changed to Solved ray-chen 11 months ago


Loading...