-
Notifications
You must be signed in to change notification settings - Fork 74
/
docker-compose.yml
77 lines (72 loc) · 1.64 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
version: '3.1'
services:
# first
zoo1:
image: zookeeper:3.6
hostname: zoo1
ports:
- 2181:2181
environment:
ZOO_MY_ID: 1
volumes:
- ./conf/zoo.cfg.1:/conf/zoo.cfg
exp1:
image: dabealu/zookeeper-exporter
ports:
- 9141:9141
command: --zk-hosts="zoo1:2181"
# second
zoo2:
image: zookeeper:3.6
hostname: zoo2
ports:
- 2182:2181
environment:
ZOO_MY_ID: 2
volumes:
- ./conf/zoo.cfg.2:/conf/zoo.cfg
exp2:
image: dabealu/zookeeper-exporter
ports:
- 9142:9141
command: --zk-hosts="zoo2:2181"
# third
zoo3:
##### Uncomment block below and comment 'image' parameter in order to test timeout
# build:
# context: zoo-timeout
# privileged: true # Needed for iptables drop rule to work in custom entrypoint script
##### End
image: zookeeper:3.6
hostname: zoo3
ports:
- 2183:2181
environment:
ZOO_MY_ID: 3
volumes:
- ./conf/zoo.cfg.3:/conf/zoo.cfg
exp3:
image: dabealu/zookeeper-exporter
ports:
- 9143:9141
command: --zk-hosts="zoo3:2181" --timeout=5
# multitarget
exp123:
image: dabealu/zookeeper-exporter
# build:
# context: .
ports:
- 9144:9141
command: --zk-hosts="zoo1:2181,zoo2:2181,zoo3:2181" --timeout=5
# prometheus server
prometheus:
image: prom/prometheus:latest
ports:
- 9090:9090
entrypoint: >
prometheus
--config.file='/etc/prometheus/prometheus.yml'
--storage.tsdb.path='data'
--web.listen-address='0.0.0.0:9090'
volumes:
- ./conf/prometheus.yml:/etc/prometheus/prometheus.yml