zerok / channels-in-docker Goto Github PK
View Code? Open in Web Editor NEWAn example project for getting to know django channels
An example project for getting to know django channels
Messages not showed in chat and server log:
combinedserver_1 | [2017/03/07 06:32:37] WebSocket DISCONNECT /socket [172.25.0.1:33257]
combinedserver_1 | [2017/03/07 06:32:39] WebSocket CONNECT /socket [172.25.0.1:33267]
combinedserver_1 | [2017/03/07 06:32:45] WebSocket DISCONNECT /socket [172.25.0.1:33261]
combinedserver_1 | [2017/03/07 06:32:53] WebSocket DISCONNECT /socket [172.25.0.1:33259]
combinedserver_1 | [2017/03/07 06:32:55] WebSocket CONNECT /socket [172.25.0.1:33270]
Run command:
docker-compose -f docker-compose.development.yml up
Production setup same result:
interfaceserver_1 | 172.25.0.1:52051 - - [07/Mar/2017:06:39:25] "GET /" 200 2641
interfaceserver_1 | 172.25.0.1:52057 - - [07/Mar/2017:06:39:25] "WSCONNECT /socket" - -
interfaceserver_1 | 172.25.0.1:52049 - - [07/Mar/2017:06:39:28] "WSDISCONNECT /socket" - -
interfaceserver_1 | 172.25.0.1:52043 - - [07/Mar/2017:06:39:28] "WSDISCONNECT /socket" - -
interfaceserver_1 | 172.25.0.1:52059 - - [07/Mar/2017:06:39:31] "WSCONNECT /socket" - -
interfaceserver_1 | 172.25.0.1:52053 - - [07/Mar/2017:06:39:36] "WSDISCONNECT /socket" - -
interfaceserver_1 | 172.25.0.1:52055 - - [07/Mar/2017:06:39:36] "WSDISCONNECT /socket" - -
Chrome Version 56.0.2924.76 (64-bit)
Hi. Why not use docker-compose entrypoint with the compose files? "Command"s are supposed to be overriden on need.
you may want to update your example to keep it up to date with the new architechture.
I am trying to learn django/docker and want to thank you for the example. Some things I am stumbling on and maybe you would like to add to future versions:
Thanks again!
We've been running Django Channels using a similar layout as this repository. In Channels 1.0, it was trivial to get a single container to run multiple workers because Channels 1.0 separated the request handling from the workers.
With the transition to Channels 2.0, this separation has gone away. The Channels documentation has an example of multiple workers using channels + nginx, but this configuration seems to require communication over a unix socket.
Do you have any thoughts on refining your example to show how to support multiple Daphne processes?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.