title: host not found in upstream when i use nginx and docker-compose
body: <p>this is my docker-compose.yml file</p>
  
  <p>i want to make a nginx to reverseproxy and django to webserver</p>
  
  <p>and i also separate them each container</p>
  
  <pre><code>version: '2'
  
  services:
    django:
      build: ./django
      container_name: django
  
    nginx:
      restart: always
      build: ./nginx
      container_name: reversproxy
      ports:
        - "7891:7891"
      depends_on:
        - django
  </code></pre>
  
  <p>and follwoing is my nginx.conf</p>
  
  <p>i set the uwsgi_pass to uwsgicluster, upstream to django containter</p>
  
  <p>but nginx container doesn't work with error </p>
  
  <p>nginx: [emerg] host not found in upstream "django:7893"</p>
  
  <pre><code>worker_processes 1;
  
  events { worker_connections 1024; }
  
  http {
          sendfile on;
  
          upstream uwsgicluster {
                  server django:7893;
          }
  
  
          server {
                  listen 7891;
  
                  location / {
                          include /etc/nginx/uwsgi_params;
                          uwsgi_pass uwsgicluster;
                          proxy_redirect off;
                          proxy_set_header Host $host;
                          proxy_set_header X-Real-IP $remote_addr;
                          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                          proxy_set_header X-Forwarded-Host $server_name;
                  }
          }
  
  }
  </code></pre>
  
  <p>how can i solve that problem??</p>