-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
33 lines (32 loc) · 895 Bytes
/
docker-compose.yaml
File metadata and controls
33 lines (32 loc) · 895 Bytes
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
version: '2.3'
services:
zookeeper:
image: confluentinc/cp-kafka:4.1.1
command:
- /usr/bin/zookeeper-server-start
- /etc/kafka/zookeeper.properties
ports:
- "2181:2181"
healthcheck:
test: "echo srvr | nc -w 1 127.0.0.1 2181 | grep -qi zookeeper"
interval: 1s
retries: 10
kafka:
depends_on:
zookeeper:
condition: service_healthy
image: confluentinc/cp-kafka:4.1.1
environment:
KAFKA_HEAP_OPTS: "-Xmx250M -Xms250M"
KAFKA_BROKER_ID: 1
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_DELETE_TOPIC_ENABLE: "true"
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
healthcheck:
test: "echo dump | nc zookeeper 2181 | grep brokers"
interval: 1s
retries: 10
ports:
- "9092:9092"