version: '3' services: nginxplus: build: ./nginxplus container_name: nginxplus links: - etcd ports: - "80:80" - "8080:8080" etcd: command: "-name etcd0 -advertise-client-urls http://${HOST_IP}:2379,http://${HOST_IP}:4001 -listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 -initial-advertise-peer-urls http://${HOST_IP}:2380 -listen-peer-urls http://0.0.0.0:2380 -initial-cluster-token etcd-cluster-1 -initial-cluster etcd0=http://${HOST_IP}:2380" image: quay.io/coreos/etcd:v2.0.8 container_name: etcd ports: - "4001:4001" - "2380:2380" - "2379:2379" registrator: command: etcd://etcd:4001 image: gliderlabs/registrator:latest container_name: registrator links: - etcd volumes: - "/var/run/docker.sock:/tmp/docker.sock"