Created
April 17, 2022 18:46
-
-
Save marcelohmariano/832a4e77989ba7e549c490d1a77c2568 to your computer and use it in GitHub Desktop.
Local Kafka setup using 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
version: "3" | |
services: | |
zookeeper: | |
image: bitnami/zookeeper | |
ports: | |
- "2181:2181" | |
environment: | |
ALLOW_ANONYMOUS_LOGIN: yes | |
volumes: | |
- zookeeper_data:/bitnami/zookeeper | |
kafka: | |
image: bitnami/kafka | |
ports: | |
- "9093:9093" | |
environment: | |
KAFKA_BROKER_ID: 1 | |
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: CLIENT | |
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT | |
KAFKA_CFG_LISTENERS: CLIENT://:9092,EXTERNAL://:9093 | |
KAFKA_CFG_ADVERTISED_LISTENERS: CLIENT://kafka:9092,EXTERNAL://localhost:9093 | |
KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper:2181 | |
ALLOW_PLAINTEXT_LISTENER: yes | |
volumes: | |
- kafka_data:/bitnami/kafka | |
depends_on: | |
- zookeeper | |
kafka-ui: | |
image: provectuslabs/kafka-ui | |
container_name: kafka-ui | |
ports: | |
- "8080:8080" | |
restart: always | |
environment: | |
KAFKA_CLUSTERS_0_NAME: Local | |
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:9092 | |
KAFKA_CLUSTERS_0_ZOOKEEPER: zookeeper:2181 | |
depends_on: | |
- zookeeper | |
- kafka | |
volumes: | |
kafka_data: | |
zookeeper_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment