-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
49 lines (44 loc) · 1.13 KB
/
docker-compose.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"
services:
consul-server-1:
image: consul:latest
hostname: consul-server-1
ports:
- "8400:8400"
- "8500:8500"
- "8600:8600"
- "8600:8600/udp"
command: "agent -server -bootstrap-expect 2 -ui -client 0.0.0.0"
consul-server-2: &consul-server
image: consul:latest
hostname: consul-server-2
command: "agent -server -retry-join consul-server-1 -ui -client 0.0.0.0"
ports:
- "8501:8500"
depends_on:
- consul-server-1
consul-server-3:
<<: *consul-server
hostname: consul-server-3
ports:
- "8502:8500"
consul-client:
image: consul:latest
hostname: consul-client
ports:
- "8504:8500"
command: "agent -client 0.0.0.0 -retry-join consul-server-1 -retry-join consul-server-2 -retry-join consul-server-3"
depends_on:
- consul-server-1
traefik:
image: traefik:latest
command: |
-c traefik.yml
--api.insecure=true
ports:
- "80:80" # The HTTP port
- "8080:8080" # The Web UI (enabled by --api)
volumes:
- ./traefik.yml:/traefik.yml
depends_on:
- consul-client