title: Running Wagtail site with Docker
body: <p>I'm trying to convert an existing Wagtail site to run with Docker. I have created the image and then run the container, but I'm unable to connect in the browser window. Getting <code>0.0.0.0 didn’t send any data. ERR_EMPTY_RESPONSE</code>. </p>
  
  <p>Dockerfile:</p>
  
  <pre><code>FROM python:3.6
  
  RUN mkdir /app
  WORKDIR /app
  
  COPY ./ /app
  
  RUN pip install --no-cache-dir -r /app/requirements/base.txt
  
  RUN mkdir -p -m 700 /app/static
  RUN mkdir -p -m 700 /app/media
  
  ENV DJANGO_SETTINGS_MODULE=mysite.settings.dev DJANGO_DEBUG=on
  ENV SECRET_KEY=notsosecretkey
  ENV DATABASE_URL=postgres://none
  ENV SENDGRID_KEY=sendgridkey
  
  EXPOSE 8080
  
  RUN chmod +x /app/entrypoint.sh \
      &amp;&amp; chmod +x /app/start-app.sh
  
  RUN python manage.py collectstatic --noinput
  
  ENTRYPOINT ["/app/entrypoint.sh"]
  CMD ["/app/start-app.sh"]
  </code></pre>
  
  <p>docker-compose.yml:</p>
  
  <pre><code>version: '2'
  
  services:
    db:
      environment:
        POSTGRES_DB: app_db
        POSTGRES_USER: app_user
        POSTGRES_PASSWORD: changeme
      restart: always
      image: postgres:9.6
      expose:
        - "5432"
      ports:
        - "5432:5432"
    app:
      container_name: mysite_dev
      build:
        context: .
        dockerfile: Dockerfile
      depends_on:
        - db
      links:
        - db:db
      volumes:
        - .:/app
      ports:
        - "8080:8080"
      environment:
        DATABASE_URL: postgres://app_user:changeme@db/app_db
      command: python manage.py runserver 0.0.0.0:8080
  </code></pre>
  
  <p>entrypoint.sh:</p>
  
  <pre><code>#!/bin/sh
  set -e
  exec "$@"
  </code></pre>
  
  <p>start-app.sh:</p>
  
  <pre><code>#!/bin/sh
  python manage.py runserver 0.0.0.0:8080
  </code></pre>
  
  <p>dev.py settings file:</p>
  
  <pre><code>from .base import *
  
  DEBUG = True
  
  for template_engine in TEMPLATES:
      template_engine['OPTIONS']['debug'] = True
  
  ALLOWED_HOSTS = (
      '0.0.0.0',
  )
  
  DATABASES = {
      'default': db_cache_url.config('DATABASE_URL', extra={'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'mysite', 'HOST': 'localhost', 'PORT': '5432'}),
  }
  
  STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
  
  WSGI_APPLICATION = 'mysite.wsgi.application'
  
  try:
      from .local import *
  except ImportError:
      pass
  </code></pre>
  
  <p>I run <code>docker run -p 8080:8080 app:latest</code> and it works when I run <code>docker ps</code> showing that it's at <code>0.0.0.0:8080-&gt;8080/tcp</code>, but when I go to <code>0.0.0.0:8080</code> in the browser window, I get the error. If I remove the <code>DATABASES</code> setting, I see Django errors loading, but then I'm getting <code>settings.DATABASES is improperly configured. Please supply the NAME value.</code> so I think it needs to be there. What am I missing?</p>