docker-archive / dockercloud-haproxy

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

How to set VIRTUAL_HOST variable on .yml file #218

Closed pedroIsai21 closed 6 years ago

pedroIsai21 commented 6 years ago

I just need to set a host to my haproxy container, For example myhost.com. But I don't know how to set that variable, I tried as below but it doesn't work. thanks. version: '2' services: app: image: myuser/myimage ports: - "8080" lb: image: dockercloud/haproxy:latest links: - app environment: - VIRTUAL_HOST=web.org app volumes: - /var/run/docker.sock:/var/run/docker.sock ports: - 80:80 - 1936:1936