mirror of
https://github.com/django/daphne.git
synced 2025-08-04 10:30:08 +03:00
Daphne deployment doc updates
This commit is contained in:
parent
29c269ead7
commit
ab89f52302
|
@ -190,6 +190,17 @@ scenario, it will eventually time out and give you a 503 error after 2 minutes;
|
||||||
you can configure how long it waits with the ``--http-timeout`` command line
|
you can configure how long it waits with the ``--http-timeout`` command line
|
||||||
argument.
|
argument.
|
||||||
|
|
||||||
|
With some browsers you may see errors regarding ``Sec-WebSocket-Protocol`` headers. You can set the allowed ws_protocols to match your client protocol like this::
|
||||||
|
|
||||||
|
CHANNELS_WS_PROTOCOLS = ["graphql-ws", ]
|
||||||
|
|
||||||
|
In production you may start a daphne server without the runserver command. So you need to pass the ws-protocl directly::
|
||||||
|
|
||||||
|
daphne --ws-protocol "graphql-ws" --proxy-headers my_project.asgi:channel_layer
|
||||||
|
|
||||||
|
Note: The daphne server binds to 127.0.0.1 by default. If you deploy this not locally, bind to your ip or to any ip::
|
||||||
|
|
||||||
|
daphne -b 0.0.0.0 -p 8000 --ws-protocol "graphql-ws" --proxy-headers my_project.asgi:channel_layer
|
||||||
|
|
||||||
Deploying new versions of code
|
Deploying new versions of code
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user