Daphne deployment doc updates

This commit is contained in:
Daniel 2017-09-15 19:08:49 +02:00 committed by Andrew Godwin
parent 29c269ead7
commit ab89f52302

View File

@ -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
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
------------------------------