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:Jump to 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...12 Replies
Project ID:
2e49781b-b89a-4e3a-bed1-23726591062b
2e49781b-b89a-4e3a-bed1-23726591062b
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
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
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
I don’t know about nixpacks. How is it diff from docker?
Also I want those containers to be talking to db
Sometime later
no matter what you do, deployments on railway will always use docker
Hmm let me try. Do u provide any resources?
nixpacks just trys to build your app for you without you having to write your own dockerfile
I see
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
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