Created
April 22, 2019 07:12
-
-
Save LMnet/2eed8f96b9c2b8fad8cb75d8fa9ce9ca to your computer and use it in GitHub Desktop.
Kafka docker compose
This file contains 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.1' | |
services: | |
zookeeper: | |
image: wurstmeister/zookeeper | |
ports: | |
- "32181:2181" | |
healthcheck: | |
test: "./bin/zkServer.sh status" | |
interval: 5s | |
timeout: 3s | |
retries: 100 | |
environment: | |
- JAVA_OPTS=-Xms32m -Xmx128m | |
kafka: | |
image: wurstmeister/kafka:2.11-2.0.1 | |
ports: | |
- "39092:9092" | |
- "39094:9094" | |
environment: | |
KAFKA_HEAP_OPTS: -Xms128M -Xmx256M | |
KAFKA_ADVERTISED_LISTENERS: INSIDE://:9092,OUTSIDE://localhost:9094 | |
KAFKA_LISTENERS: INSIDE://:9092,OUTSIDE://:9094 | |
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT | |
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE | |
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 | |
KAFKA_CREATE_TOPICS: foo:1:1,bar:1:1 | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
healthcheck: | |
test: "kafka-topics.sh --zookeeper zookeeper:2181 --list | grep test" | |
interval: 5s | |
timeout: 10s | |
retries: 100 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment