Skip to content

Instantly share code, notes, and snippets.

@sovietspy2
Created October 28, 2021 14:33
Show Gist options
  • Save sovietspy2/4f5cba96f0ed462bec8d4ce89930c1ea to your computer and use it in GitHub Desktop.
Save sovietspy2/4f5cba96f0ed462bec8d4ce89930c1ea to your computer and use it in GitHub Desktop.
Kafka+Zookeeper+KafkaDrop
version: '2'
services:
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181:2181"
kafka:
image: wurstmeister/kafka
ports:
- "9092:9092"
environment:
PORT_COMMAND: "docker port $$(hostname) 9092/tcp | cut -d: -f2"
HOSTNAME_COMMAND: "route -n | awk '/UG[ \t]/{print $$2}'"
KAFKA_CREATE_TOPICS: "test:1:1"
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
volumes:
- /var/run/docker.sock:/var/run/docker.sock
kafdrop:
image: obsidiandynamics/kafdrop
ports:
- 9100:9000
environment:
- KAFKA_BROKERCONNECT=kafka:9092
- JVM_OPTS=-Xms32M -Xmx64M
depends_on:
- kafka
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment