-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-3n.yaml
40 lines (38 loc) · 1.09 KB
/
docker-compose-3n.yaml
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
version: '3.1'
services:
hw0:
image: YOUR_ZK_IMAGE
hostname: hw0
ports:
- 2181:2181
environment:
ZOO_MY_ID: 1
# Uncomment for pass environment variable
# ENV_NAME: VALUE
ZOO_SERVERS: server.1=hw0:2888:3888;2181 server.2=hw1:2888:3888;2181 server.3=hw2:2888:3888;2181
volumes:
- YOUR_ZOOKEEPER_REPO:/apache-zookeeper-3.6.1-bin/
hw1:
image: YOUR_ZK_IMAGE
hostname: hw1
ports:
- 2182:2181
environment:
ZOO_MY_ID: 2
# Uncomment for pass environment variable
# ENV_NAME: VALUE
ZOO_SERVERS: server.1=hw0:2888:3888;2181 server.2=hw1:2888:3888;2181 server.3=hw2:2888:3888;2181
volumes:
- YOUR_ZOOKEEPER_REPO:/apache-zookeeper-3.6.1-bin/
hw2:
image: YOUR_ZK_IMAGE
hostname: hw2
ports:
- 2183:2181
environment:
ZOO_MY_ID: 3
# Uncomment for pass environment variable
# ENV_NAME: VALUE
ZOO_SERVERS: server.1=hw0:2888:3888;2181 server.2=hw1:2888:3888;2181 server.3=hw2:2888:3888;2181
volumes:
- YOUR_ZOOKEEPER_REPO:/apache-zookeeper-3.6.1-bin/