-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
113 lines (105 loc) · 2.2 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
105
106
107
108
109
110
111
112
113
version: '3.1'
services:
zoo1:
image: zookeeper
restart: always
hostname: zoo1
ports:
- 2181:2181
environment:
ZOO_MY_ID: 1
ZOO_SERVERS: server.1=0.0.0.0:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181
volumes:
- ./conf/1:/conf
- ./data/1:/data
networks:
extnet:
ipv4_address: 192.168.101.254
zoo2:
image: zookeeper
restart: always
hostname: zoo2
ports:
- 2182:2181
environment:
ZOO_MY_ID: 2
ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=0.0.0.0:2888:3888;2181 server.3=zoo3:2888:3888;2181
volumes:
- ./conf/2:/conf
- ./data/2:/data
networks:
extnet:
ipv4_address: 192.168.101.253
zoo3:
image: zookeeper
restart: always
hostname: zoo3
ports:
- 2183:2181
environment:
ZOO_MY_ID: 3
ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=0.0.0.0:2888:3888;2181
volumes:
- ./conf/3:/conf
- ./data/3:/data
networks:
extnet:
ipv4_address: 192.168.101.253
web:
image: elkozmon/zoonavigator-web:latest
restart: always
hostname: zoonavigator-web
ports:
- 8000:8000
environment:
API_PORT: 9000
API_HOST: "api"
depends_on:
- api
networks:
- extnet
api:
image: elkozmon/zoonavigator-api:latest
restart: always
hostname: zoonavigator-api
environment:
API_HTTP_PORT: 9000
depends_on:
- zoo1
- zoo2
- zoo3
ports:
- 9000:9000
networks:
- extnet
web_server:
image: httpd:latest
restart: always
hostname: web_server
ports:
- 80:80
deploy:
mode: global
depends_on:
- api
volumes:
- ./server.conf:/usr/local/apache2/conf/server.conf
networks:
- extnet
visualizer:
image: dockersamples/visualizer
ports:
- 8008:8080
deploy:
placement:
constraints:
- node.role == manager
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- extnet
networks:
extnet:
ipam:
config:
- subnet: 192.168.101.0/24