-
Notifications
You must be signed in to change notification settings - Fork 89
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
48 lines (47 loc) · 1.75 KB
/
Copy pathdocker-compose.yml
File metadata and controls
48 lines (47 loc) · 1.75 KB
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
# https://github.com/conduktor/kafka-stack-docker-compose
---
services:
zoo1:
image: confluentinc/cp-zookeeper:7.5.3
hostname: zoo1
container_name: zoo1
ports:
- "127.0.0.1:2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_SERVER_ID: 1
ZOOKEEPER_SERVERS: zoo1:2888:3888
healthcheck:
# cub is shipped in the image; the 4lw "ruok" probe is not whitelisted by default in ZK 3.5+
test: ["CMD", "cub", "zk-ready", "localhost:2181", "5"]
interval: 5s
timeout: 10s
retries: 24
kafka1:
image: confluentinc/cp-kafka:7.5.3
hostname: kafka1
container_name: kafka1
ports:
- "127.0.0.1:9092:9092"
environment:
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka1:19092,EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
KAFKA_ZOOKEEPER_CONNECT: "zoo1:2181"
KAFKA_BROKER_ID: 1
KAFKA_LOG4J_LOGGERS: "kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
# Consumer groups are created per-run, so skip the 3s default rebalance debounce
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
# Tests create their topics explicitly; test_invalid_topic depends on this being off
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
healthcheck:
test: ["CMD-SHELL", "kafka-broker-api-versions --bootstrap-server localhost:9092"]
interval: 5s
timeout: 10s
retries: 24
depends_on:
zoo1:
condition: service_healthy