-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
78 lines (73 loc) · 2.13 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
version: '3.4'
services:
zookeeper:
image: confluentinc/cp-zookeeper:4.1.0
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:4.1.0
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:4.1.0
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:4.1.0
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-server:
image: confluentinc/ksql-cli:0.5
hostname: ksql-server
depends_on:
- kafka-1
- kafka-2
- kafka-3
volumes:
- ./ksqlserver.properties:/etc/ksql/ksqlserver.properties
ports:
- "8088:8088"
command: "ksql-server-start /etc/ksql/ksqlserver.properties"
environment:
KSQL_CONFIG_DIR: "/etc/ksql"
KSQL_LOG4J_OPTS: "-Dlog4j.configuration=file:/etc/ksql/log4j-rolling.properties"
ksql-cli:
image: confluentinc/ksql-cli:0.5
hostname: ksql-cli
depends_on:
- ksql-server
command: "perl -e 'while(1){ sleep 99999 }'"
environment:
KSQL_CONFIG_DIR: "/etc/ksql"
KSQL_LOG4J_OPTS: "-Dlog4j.configuration=file:/etc/ksql/log4j-rolling.properties"