title: docker-compose scale does not work with haproxy
body: <p>I'm playing around with docker-compose haproxy and nginx.
  What I'm trying to accomplish is that if I scale the nginx container to be </p>
  
  <blockquote>
    <p>docker-compose scale nginx=2</p>
  </blockquote>
  
  <p>the haproxy container also proxies the new nginx container. But somehow its not recognizing the new container.</p>
  
  <p>Here are my configs:</p>
  
  <p>docker-compose.yml:</p>
  
  <pre><code>version: '2.1'
  services:
  
    nginx:
      image: 'bitnami/nginx:latest'
      healthcheck:
        test: "curl -f http://localhost/?healthcheck"
      expose:
        - "80"
  
    haproxy:
      image: haproxy
      restart: always
      depends_on:
        nginx:
          condition: service_healthy
      links:
        - nginx
      ports:
        - "80:80"
      volumes:
        - ./haproxy:/usr/local/etc/haproxy/
      expose:
        - "80" 
  </code></pre>
  
  <p>haproxy.cfg</p>
  
  <pre><code>global
    log 127.0.0.1 local0
    log 127.0.0.1 local1 notice
  
  defaults
    log global
    mode http
    option httplog
    timeout connect 5000
    timeout client 10000
    timeout server 10000
  
  frontend localnodes
    bind 0.0.0.0:80
    mode http
    default_backend nodes
  
  backend nodes
    mode http
    option forwardfor
    balance roundrobin
    server nginx nginx:80 check
    option httpchk GET /?haproxyselfcheck
    http-check expect status 200 
  </code></pre>
  
  <p>What could I do to get haproxy to recognize the new container without just adding one more nginx into docker-compose file manually? </p>