title: running django worker and daphne in docker container
body: <p>I have django application that run in docker container. Recently i figured out that i'm going to need to add websockets interface to my application. I'm using channels with daphne behind nginx and redis as a cache.  The problem is that i have to run django workers and  daphne in 1 container.
  Script that is running on container startup:</p>
  
  <pre><code>#!/usr/bin/env bash
  
  python wait_for_postgres.py
  python manage.py makemigrations
  python manage.py migrate
  python manage.py collectstatic --no-input
  
  python manage.py runworker --only-channels=http.* --only-channels=websocket.* -v2
  daphne team_up.asgi:channel_layer --port 8000 -b 0.0.0.0
  </code></pre>
  
  <p>But it hangs on running a worker. I tried nohup but it seems to not work. If i run daphne directly from container with docker exec everything works just fine.</p>