title: How to use nginx with docker as a reverse proxy
body: <p>I have a django app and running it with gunicorn on localhost:8000
  I have configs for nginx to use it as a reverse proxy.</p>
  
  <pre><code>    upstream django {
   #  fail_timeout=0 means we always retry an upstream even if it failed
   #  to return a good HTTP response (in case the Unicorn master nukes a
   #  single worker for timing out).
  
    server localhost:8000 fail_timeout=0;
  }
  </code></pre>
  
  <p>I know how to expose 80 port and run nginx in container, but I don't understand how to connect gunicorn running on localhost and nginx in container.</p>