R
Railway15mo ago
linda_

Dash is running on http://127.0.0.1:5984/ but server error

Hi, it is my first time using Railway app, the build is active but server error, and it says: Looks like your app is listening on 127.0.0.1. You may need to listen on 0.0.0.0 instead. service ID: 14743028-2549-4a5e-89f7-5f10c93716da please kindly help.
17 Replies
Percy
Percy15mo ago
Project ID: 14743028-2549-4a5e-89f7-5f10c93716da
linda_
linda_15mo ago
I don't understand this part: Solution To fix this, start your application's server using: Host = 0.0.0.0, Port = Value of the PORT environment variable provided by Railway. Alternatively, you can set a custom PORT service variable in your Railway environment to tell Railway that your application is available at the port you specified. For more information, check out Defining Variables. This approach is not recommended. Can you please tell me an example on how to create that?
Brody
Brody15mo ago
what framework?
linda_
linda_15mo ago
Python Using Dash
Brody
Brody15mo ago
what's your current start command
linda_
linda_15mo ago
python3 app.py
linda_
linda_15mo ago
GitHub
GitHub - withLinda/RailwayAppForNala: Dash DataTable; Initial depl...
Dash DataTable; Initial deployment to Railway app - GitHub - withLinda/RailwayAppForNala: Dash DataTable; Initial deployment to Railway app
Brody
Brody15mo ago
where is this set?
linda_
linda_15mo ago
On settings - deploy - start command
Brody
Brody15mo ago
you already have gunicorn in your requirements.txt file so thats perfect, change your start command to gunicorn app:server
linda_
linda_15mo ago
ow, ok. i'll try now
Brody
Brody15mo ago
and as outlined in the docs link I sent above, gunicorn listens in 0.0.0.0 and $PORT by default
linda_
linda_15mo ago
noted, thanks
Brody
Brody15mo ago
let me know if it doesn't work or you have any more questions
linda_
linda_15mo ago
It works! thank you so much!
Brody
Brody15mo ago
no problem!