503 error after binding to ipv6

I get a 503 error after binding to ipv6 for internal communication between 2 services. attached my dockerfile for reference I dont get any errors in deployment and build logs
Solution:
as for the start command: - Uvicorn: uvicorn main:app --host :: --port $PORT Uvicorn does not support dual stack binding (IPv6 and IPv4) from the CLI, so while that start command will work to enable access from within the private network, this prevents you from accessing the app from the public domain if needed, I recommend using Hypercorn instead...
Jump to solution
12 Replies
Percy
Percy16mo ago
Project ID: 2e49781b-b89a-4e3a-bed1-23726591062b
.thunder_bolt
.thunder_boltOP16mo ago
2e49781b-b89a-4e3a-bed1-23726591062b
Brody
Brody16mo ago
your dockerfile doesn't really do anything nixpacks doesn't by default, for this I would recommend moving back to nixpacks. as for the binding stuff, use this start command in either a railway.json or Procfile (after you move back to nixpacks) gunicorn main:app -b [::]:$PORT
.thunder_bolt
.thunder_boltOP16mo ago
that spoils the entire architecture of my app. (: .. my architecture is basically 10 microservices talking to each other , which are accessed via an api gateway for the frontend can i achieve this using railway?\ @Brody
Brody
Brody16mo ago
absolutely, I don't know why moving back to nixpacks spoils anything?? but I did make a mistake, I gave you a start command for gunicorn instead of uvicorn
.thunder_bolt
.thunder_boltOP16mo ago
I don’t know about nixpacks. How is it diff from docker? Also I want those containers to be talking to db Sometime later
Brody
Brody16mo ago
no matter what you do, deployments on railway will always use docker
.thunder_bolt
.thunder_boltOP16mo ago
Hmm let me try. Do u provide any resources?
Brody
Brody16mo ago
nixpacks just trys to build your app for you without you having to write your own dockerfile
.thunder_bolt
.thunder_boltOP16mo ago
I see
Brody
Brody16mo ago
here are the docs https://nixpacks.com/docs but, to use nixpacks, its as simple as removing your dockerfile and railway will default back to nixpacks, and your dockerfile doesnt do anything nixpacks wouldnt do by default, so as long as you have a Procfile or railway.json with the correct start command, it will work
Solution
Brody
Brody16mo ago
as for the start command: - Uvicorn: uvicorn main:app --host :: --port $PORT Uvicorn does not support dual stack binding (IPv6 and IPv4) from the CLI, so while that start command will work to enable access from within the private network, this prevents you from accessing the app from the public domain if needed, I recommend using Hypercorn instead - Hypercorn: hypercorn main:app --bind [::]:$PORT
Want results from more Discord servers?
Add your server