Last active
June 11, 2025 19:58
-
-
Save davidcsejtei/53d11025c5f4b6618148440eddb57229 to your computer and use it in GitHub Desktop.
Kafka docker compose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
zookeeper: | |
image: confluentinc/cp-zookeeper:7.6.0 | |
ports: | |
- '2181:2181' | |
environment: | |
ZOOKEEPER_CLIENT_PORT: 2181 | |
ZOOKEEPER_TICK_TIME: 2000 | |
kafka: | |
image: confluentinc/cp-kafka:7.6.0 | |
ports: | |
- '9092:9092' | |
- '29092:29092' | |
environment: | |
KAFKA_BROKER_ID: 1 | |
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 | |
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,DOCKER:PLAINTEXT | |
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092,DOCKER://kafka:29092 | |
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092,DOCKER://0.0.0.0:29092 | |
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true' | |
kafka-ui: | |
image: provectuslabs/kafka-ui:latest | |
ports: | |
- '8080:8080' | |
environment: | |
KAFKA_CLUSTERS_0_NAME: local | |
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:29092 | |
depends_on: | |
- kafka |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment