-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathdocker-compose-consul.yml
49 lines (44 loc) · 967 Bytes
/
docker-compose-consul.yml
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
37
38
39
40
41
42
43
44
45
46
47
48
49
version: '3.1'
# https://www.consul.io/intro/index.html
# http://gliderlabs.github.io/registrator/latest/
services:
consul:
hostname: consul
container_name: consul
image: consul:latest
restart: always
environment:
- CONSUL_LOCAL_CONFIG={"disable_update_check":true}
entrypoint:
- consul
- agent
- -server
- -bootstrap
- -data-dir=/data
- -bind={{ GetInterfaceIP "eth0" }}
- -client=0.0.0.0
- -ui
volumes:
- consul:/data
networks:
- consul
ports:
- 8500:8500 # protect this in the real world!
registrator:
container_name: registrator
command: -internal consul://consul:8500
privileged: true
image: gliderlabs/registrator:latest
restart: always
links:
- consul
volumes:
- /var/run/docker.sock:/tmp/docker.sock
networks:
- consul
networks:
consul:
external:
name: consul
volumes:
consul: