Created
May 17, 2019 20:02
-
-
Save jponge/d699d4cd83fb4fa842bfeb073e6f122e to your computer and use it in GitHub Desktop.
Docker Kafka and ZooKeeper using Strimzi
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: strimzi/zookeeper | |
command: [ | |
"sh", "-c", | |
"bin/zookeeper-server-start.sh config/zookeeper.properties" | |
] | |
ports: | |
- "2181:2181" | |
environment: | |
LOG_DIR: /tmp/logs | |
kafka: | |
image: strimzi/kafka | |
command: [ | |
"sh", "-c", | |
"bin/kafka-server-start.sh config/server.properties --override listeners=$${KAFKA_LISTENERS} --override advertised.listeners=$${KAFKA_ADVERTISED_LISTENERS} --override zookeeper.connect=$${KAFKA_ZOOKEEPER_CONNECT}" | |
] | |
depends_on: | |
- zookeeper | |
ports: | |
- "9092:9092" | |
environment: | |
LOG_DIR: "/tmp/logs" | |
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092 | |
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092 | |
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment