Created
December 25, 2019 21:08
-
-
Save hadisfr/7d0a0084dcf691662f3ea393c9c4226b to your computer and use it in GitHub Desktop.
Docker Compose for Kafka based on https://github.com/bitnami/bitnami-docker-kafka
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: '2' | |
networks: | |
kafka: | |
driver: bridge | |
ipam: | |
config: | |
- subnet: 10.20.0.0/16 | |
services: | |
zookeeper: | |
image: 'bitnami/zookeeper:3' | |
ports: | |
- '2181:2181' | |
volumes: | |
- 'zookeeper_data:/bitnami' | |
networks: | |
- kafka | |
environment: | |
- ALLOW_ANONYMOUS_LOGIN=yes | |
kafka: | |
image: 'bitnami/kafka:2' | |
ports: | |
- '9092:9092' | |
- '29092:29092' | |
volumes: | |
- 'kafka_data:/bitnami' | |
networks: | |
- kafka | |
environment: | |
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181 | |
- ALLOW_PLAINTEXT_LISTENER=yes | |
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT | |
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,PLAINTEXT_HOST://:29092 | |
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092 | |
depends_on: | |
- zookeeper | |
volumes: | |
zookeeper_data: | |
driver: local | |
kafka_data: | |
driver: local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment