1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| version: '3'
services: consul: image: consul container_name: consul environment: SERVICE_8500_NAME: consul SERVICE_8500_TAGS: "consul,http" ports: - 8400:8400 - 8500:8500 - 8600:53/udp command: agent -server -client=0.0.0.0 -dev -node=node0 -bootstrap-expect=1 -data-dir=/tmp/consul
registrator: image: gliderlabs/registrator depends_on: - consul volumes: - /var/run/docker.sock:/tmp/docker.sock command: -internal consul://consul:8500
nginx-consul: image: my-nginx-consul:alpine build: . depends_on: - consul - registrator ports: - 80:80 volumes: - ./files/nginx.conf.ctmpl:/etc/nginx/nginx.conf.ctmpl environment: HOST_TYPE: ${HOST_TYPE} command: -consul-addr=consul:8500 -wait=3s -template /etc/nginx/nginx.conf.ctmpl:/etc/nginx/conf.d/app.conf:/etc/nginx/nginx.sh
|