-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
75 lines (69 loc) · 2.03 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
version: "3.8"
services:
consul-server1:
image: consul:flama
container_name: consul-server1
restart: always
volumes:
- ./consul-server/server1.json:/etc/consul.d/server1.json:ro
- ./certs/:/etc/consul.d/certs/:ro
networks:
- consul
ports:
- "8500:8500"
- "8600:8600/tcp"
- "8600:8600/udp"
command: "consul agent -bootstrap-expect=3 -config-dir /etc/consul.d"
consul-server2:
image: consul:flama
container_name: consul-server2
restart: always
volumes:
- ./consul-server/server2.json:/etc/consul.d/server2.json:ro
- ./certs/:/etc/consul.d/certs/:ro
networks:
- consul
expose:
- "8600/tcp"
- "8600/udp"
command: "consul agent -bootstrap-expect=3 -config-dir /etc/consul.d"
consul-server3:
image: consul:flama
container_name: consul-server3
restart: always
volumes:
- ./consul-server/server3.json:/etc/consul.d/server3.json:ro
- ./certs/:/etc/consul.d/certs/:ro
networks:
- consul
expose:
- "8600/tcp"
- "8600/udp"
command: "consul agent -bootstrap-expect=3 -config-dir /etc/consul.d"
haproxy:
image: haproxy:2.4
container_name: haproxy
restart: always
volumes:
- ./haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
networks:
- consul
ports:
- "8080:80"
- "9090:9090"
consul-client-webserver:
image: webserver:flama
restart: always
volumes:
- ./consul-client-webserver/client.json:/etc/consul.d/client.json:ro
- ./consul-client-webserver/webserver.json:/etc/consul.d/webserver.json:ro
- ./consul-client-webserver/apache2_supervised.conf:/etc/supervisor/conf.d/apache2_supervised.conf:ro
- ./consul-client-webserver/consul_supervised.conf:/etc/supervisor/conf.d/consul_supervised.conf:ro
- ./certs/:/etc/consul.d/certs/:ro
networks:
- consul
command: "/usr/bin/supervisord --nodaemon -c /etc/supervisor/supervisord.conf"
networks:
consul:
name: consul
driver: bridge