-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
113 lines (104 loc) · 2.95 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.0"
services:
zk1:
image: zookeeper:3.5.9
restart: always
hostname: zk1
ports:
- "2181:2181"
environment:
ZOO_MY_ID: 1
ZOO_SERVERS: server.1=zk1:2888:3888;2181 server.2=zk2:2888:3888;2181 server.3=zk3:2888:3888;2181
volumes:
- "~/zk-cluster/zk1/data:/data"
zk2:
image: zookeeper:3.5.9
restart: always
hostname: zk2
ports:
- "2182:2181"
environment:
ZOO_MY_ID: 2
ZOO_SERVERS: server.1=zk1:2888:3888;2181 server.2=zk2:2888:3888;2181 server.3=zk3:2888:3888;2181
volumes:
- "~/zk-cluster/zk2/data:/data"
zk3:
image: zookeeper:3.5.9
restart: always
hostname: zk3
ports:
- "2183:2181"
environment:
ZOO_MY_ID: 3
ZOO_SERVERS: server.1=zk1:2888:3888;2181 server.2=zk2:2888:3888;2181 server.3=zk3:2888:3888;2181
volumes:
- "~/zk-cluster/zk3/data:/data"
kafka-manager:
container_name: kafka-manager
image: hlebalbau/kafka-manager
restart: on-failure
depends_on:
- kafka1
- kafka2
- kafka3
- zk1
- zk2
- zk3
environment:
ZK_HOSTS: zk1:2181
APPLICATION_SECRET: "random-secret"
KM_ARGS: -Djava.net.preferIPv4Stack=true
ports:
- "9000:9000"
kafka1:
image: confluentinc/cp-kafka:6.1.4
depends_on:
- zk1
- zk2
- zk3
restart: on-failure
ports:
- 9091:9091
environment:
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP : INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME : INTERNAL
KAFKA_ADVERTISED_LISTENERS : INTERNAL://kafka1:19091,EXTERNAL://localhost:9091
KAFKA_ZOOKEEPER_CONNECT : zk1:2181,zk2:2181,zk3:2181
KAFKA_BROKER_ID : 1
BOOTSTRAP_SERVERS : kafka1:19091,kafka2:19092,kafka3:19093
kafka2:
image: confluentinc/cp-kafka:6.1.4
depends_on:
- zk1
- zk2
- zk3
restart: on-failure
ports:
- "9092:9092"
environment:
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP : INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME : INTERNAL
KAFKA_ADVERTISED_LISTENERS : INTERNAL://kafka2:19092,EXTERNAL://localhost:9092
KAFKA_ZOOKEEPER_CONNECT : zk1:2181,zk2:2181,zk3:2181
KAFKA_BROKER_ID : 2
BOOTSTRAP_SERVERS : kafka1:19091,kafka2:19092,kafka3:19093
kafka3:
image: confluentinc/cp-kafka:6.1.4
depends_on:
- zk1
- zk2
- zk3
restart: on-failure
ports:
- 9093:9093
environment:
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP : INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME : INTERNAL
KAFKA_ADVERTISED_LISTENERS : INTERNAL://kafka3:19093,EXTERNAL://localhost:9093
KAFKA_ZOOKEEPER_CONNECT : zk1:2181,zk2:2181,zk3:2181
KAFKA_BROKER_ID : 3
BOOTSTRAP_SERVERS : kafka1:19091,kafka2:19092,kafka3:19093
networks:
default:
external:
name: coin-pipeliner