-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
104 lines (98 loc) · 2.27 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
version: "3.8"
services:
consul-server1:
build: ./consul
image: consul:local
restart: always
networks:
- consul
command: "consul agent -config-dir /etc/consul.d"
container_name: consul-server1
volumes:
- ./consul/consul-server1.hcl:/etc/consul.d/consul-server1.hcl:ro
- ./certs/:/etc/consul.d/certs/:ro
ports:
- "8300:8300"
- "8301:8301"
- "8301:8301/udp"
- "8302:8302"
- "8302:8302/udp"
- "8500:8500"
- "8600:8600/tcp"
- "8600:8600/udp"
consul-server2:
build: ./consul
image: consul:local
restart: always
networks:
- consul
command: "consul agent -config-dir /etc/consul.d"
container_name: consul-server2
volumes:
- ./consul/consul-server2.hcl:/etc/consul.d/consul-server2.hcl:ro
- ./certs/:/etc/consul.d/certs/:ro
expose:
- "8300"
- "8301"
- "8301/udp"
- "8302"
- "8302/udp"
- "8500"
- "8600/tcp"
- "8600/udp"
consul-server3:
build: ./consul
image: consul:local
restart: always
networks:
- consul
command: "consul agent -config-dir /etc/consul.d"
container_name: consul-server3
volumes:
- ./consul/consul-server3.hcl:/etc/consul.d/consul-server3.hcl:ro
- ./certs/:/etc/consul.d/certs/:ro
expose:
- "8300"
- "8301"
- "8301/udp"
- "8302"
- "8302/udp"
- "8500"
- "8600/tcp"
- "8600/udp"
vault-server1:
build: ./vault
image: vault:local
restart: always
container_name: vault-server1
volumes:
- ./vault/vault-server1.hcl:/etc/vault.d/vault-server1.hcl:ro
ports:
- "8200:8200"
cap_add:
- IPC_LOCK
depends_on:
- consul-server1
networks:
- consul
command: "vault server -config=/etc/vault.d/vault-server1.hcl"
vault-server2:
build: ./vault
image: vault:local
restart: always
container_name: vault-server2
volumes:
- ./vault/vault-server2.hcl:/etc/vault.d/vault-server2.hcl:ro
expose:
- "8200"
cap_add:
- IPC_LOCK
depends_on:
- consul-server1
networks:
- consul
command: "vault server -config=/etc/vault.d/vault-server2.hcl"
networks:
consul:
name: consul
driver: bridge