-
Notifications
You must be signed in to change notification settings - Fork 66
/
docker-compose.yml
63 lines (59 loc) · 1.63 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
version: '3.4'
services:
zookeeper:
image: confluentinc/cp-zookeeper:5.3.1
hostname: zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181
healthcheck:
test: ["CMD", "bash", "-c", "echo ruok | nc localhost 2181 | grep imok"]
start_period: 30s
kafka-1:
image: confluentinc/cp-kafka:5.3.1
hostname: kafka-1
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-1:9092
KAFKA_DEFAULT_REPLICATION_FACTOR: 3
healthcheck:
test: ["CMD", "nc", "127.0.0.1", "9092"]
start_period: 30s
kafka-2:
image: confluentinc/cp-kafka:5.3.1
hostname: kafka-2
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 2
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-2:9092
KAFKA_DEFAULT_REPLICATION_FACTOR: 3
healthcheck:
test: ["CMD", "nc", "127.0.0.1", "9092"]
start_period: 30s
kafka-3:
image: confluentinc/cp-kafka:5.3.1
hostname: kafka-3
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 3
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-3:9092
KAFKA_DEFAULT_REPLICATION_FACTOR: 3
healthcheck:
test: ["CMD", "nc", "127.0.0.1", "9092"]
start_period: 30s
ksql:
image: confluentinc/cp-ksql-server:5.2.1
hostname: ksql-cli
depends_on:
- kafka-1
- kafka-2
- kafka-3
environment:
KSQL_BOOTSTRAP_SERVERS: kafka-1:9092
KSQL_LISTENERS: http://0.0.0.0:8088