-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy pathdocker-compose-cluster.yml
47 lines (45 loc) · 1.12 KB
/
docker-compose-cluster.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
version: '2'
services:
zookeeper:
image: 'bitnami/zookeeper:latest'
ports:
- '2181'
- '2888'
- '3888'
volumes:
- zookeeper_data:/bitnami
environment:
- ZOO_SERVER_ID=1
- ALLOW_ANONYMOUS_LOGIN=yes
- ZOO_SERVERS=server.1=0.0.0.0:2888:3888,server.2=zookeeper2:2888:3888,server.3=zookeeper3:2888:3888
zookeeper2:
image: 'bitnami/zookeeper:latest'
ports:
- '2181'
- '2888'
- '3888'
volumes:
- zookeeper2_data:/bitnami
environment:
- ZOO_SERVER_ID=2
- ALLOW_ANONYMOUS_LOGIN=yes
- ZOO_SERVERS=server.1=zookeeper:2888:3888,server.2=0.0.0.0:2888:3888,server.3=zookeeper3:2888:3888
zookeeper3:
image: 'bitnami/zookeeper:latest'
ports:
- '2181'
- '2888'
- '3888'
volumes:
- zookeeper3_data:/bitnami
environment:
- ZOO_SERVER_ID=3
- ALLOW_ANONYMOUS_LOGIN=yes
- ZOO_SERVERS=server.1=zookeeper:2888:3888,server.2=zookeeper2:2888:3888,server.3=0.0.0.0:2888:3888
volumes:
zookeeper_data:
driver: local
zookeeper2_data:
driver: local
zookeeper3_data:
driver: local