Private network setup help
magdevwi
PROOP

2 years ago

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 & \

```

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

1 Replies

brody
EMPLOYEE

2 years ago

you can use gunicorn with the uvicorn event worker, gunicorn supports dual stack binding, or use hypercorn since that also supports dual stack binding


Loading...