-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
74 lines (68 loc) · 1.56 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
version: '3'
services:
zk1:
image: zookeeper:3.6
container_name: zk1
hostname: zk1
ports:
- 2181:2181
environment:
ZOO_MY_ID: 1
ZOO_PORT: 2181
ZOO_SERVERS: server.1=zk1:2888:3888;2181 server.2=zk2:2888:3888;2181 server.3=zk3:2888:3888;2181
zk2:
image: zookeeper:3.6
container_name: zk2
hostname: zk2
ports:
- 2182:2181
environment:
ZOO_MY_ID: 2
ZOO_PORT: 2181
ZOO_SERVERS: server.1=zk1:2888:3888;2181 server.2=zk2:2888:3888;2181 server.3=zk3:2888:3888;2181
zk3:
image: zookeeper:3.6
container_name: zk3
hostname: zk3
ports:
- 2183:2181
environment:
ZOO_MY_ID: 3
ZOO_PORT: 2181
ZOO_SERVERS: server.1=zk1:2888:3888;2181 server.2=zk2:2888:3888;2181 server.3=zk3:2888:3888;2181
kafka1:
image: wurstmeister/kafka
container_name: kafka1
environment:
- KAFKA_ADVERTISED_HOST_NAME=kafka1
- KAFKA_ZOOKEEPER_CONNECT=zk1:2181,zk2:2181,zk3:2181
ports:
- 9092
depends_on:
- zk1
- zk2
- zk3
kafka2:
image: wurstmeister/kafka
container_name: kafka2
environment:
- KAFKA_ADVERTISED_HOST_NAME=kafka2
- KAFKA_ZOOKEEPER_CONNECT=zk1:2181,zk2:2181,zk3:2181
ports:
- 9092
depends_on:
- zk1
- zk2
- zk3
kafka3:
image: wurstmeister/kafka
container_name: kafka3
environment:
- KAFKA_ADVERTISED_HOST_NAME=kafka3
- KAFKA_ZOOKEEPER_CONNECT=zk1:2181,zk2:2181,zk3:2181
ports:
- 9092
depends_on:
- zk1
- zk2
- zk3