Private network setup help

Hi all hope someone can help us. Sofar loving Railway! We have a Django application that we want to use as API layer with private networking but also want the admin panel to be accessible. Right now we use uvicorn because we need it for async actions. Our dockerfile looks like this.
# For public networking in production:
CMD uvicorn wisepimnew.asgi:application --host 0.0.0.0 --port $PORT & \
# For private networking in production:
# CMD uvicorn wisepimnew.asgi:application --host :: --port $PORT & \
# For public networking in production:
CMD uvicorn wisepimnew.asgi:application --host 0.0.0.0 --port $PORT & \
# For private networking in production:
# CMD uvicorn wisepimnew.asgi:application --host :: --port $PORT & \
But we would like to have both ‘::’ as host for private networking and ‘0.0.0.0’ so the Django admin can be accessed. Is there any solution for this? Project id: 04e1fc6d-4c23-41fc-b62d-9f4ae0620318
Solution:
you can use gunicorn with the async event worker, gunicorn supports dual stack binding, or use hypercorn since that also supports dual stack binding
Jump to solution
2 Replies
Percy
Percy7mo ago
Project ID: 04e1fc6d-4c23-41fc-b62d-9f4ae0620318
Solution
Brody
Brody7mo ago
you can use gunicorn with the async event worker, gunicorn supports dual stack binding, or use hypercorn since that also supports dual stack binding
Want results from more Discord servers?
Add your server