docker-archive / dockercloud-haproxy

HAproxy image that autoreconfigures itself when used in Docker Cloud
https://cloud.docker.com/
651 stars 187 forks source link

Some question about multi-ports balance and ADDITIONAL_SERVICES #236

Open eromoe opened 6 years ago

eromoe commented 6 years ago

Hello,

  1. Can I use one lb for different service (different ports) , like below

    version: '2'
    services:
      web:
        image: dockercloud/hello-world
        expose:
          - "80"
      blog:
        image: dockercloud/hello-world
        ports:
          - 8080:80
        expose:
          - "8080"
      lb:
        image: dockercloud/haproxy
        links:
          - web
          - blog
        ports:
          - 8841:80
          - 8842:8080

    I wrote this , but can't access by 8841 and 8842

  2. If I use ADDITIONAL_SERVICES , I have to provide the docker-compose.yml 's folder name , such as project_dir ??