Skip to content

Instantly share code, notes, and snippets.

@saabeilin saabeilin/docker-compose.yaml Secret
Created Nov 7, 2018

Embed
What would you like to do?
docker-compose file for single Kafka broker in dev
version: '3.5'
services:
zookeeper-1:
image: confluentinc/cp-zookeeper:5.0.0
hostname: zookeeper-1
container_name: zookeeper-1
ports:
- "2181:2181"
env_file:
- zookeeper.env
healthcheck:
test: /bin/sh -c '[ \"imok\" = \"$$(echo ruok | nc -w 1 127.0.0.1 2181)\" ]' || exit 1
interval: 1m
volumes:
- zookeeper-1-data:/var/lib/zookeeper/data/
- zookeeper-1-log:/var/lib/zookeeper/log/
kafka-1:
image: confluentinc/cp-kafka:5.0.0
hostname: kafka-1
container_name: kafka-1
stop_grace_period: 5m
depends_on:
- zookeeper-1
ports:
- "9092:9092"
- "29092:29092"
env_file:
- kafka.env
volumes:
- kafka-1-data:/var/lib/kafka/data/
schema-registry:
image: confluentinc/cp-schema-registry:5.0.0
hostname: schema-registry
container_name: schema-registry
depends_on:
- zookeeper-1
- kafka-1
ports:
- "8081:8081"
env_file:
- schema-registry.env
volumes:
zookeeper-1-data:
zookeeper-1-log:
kafka-1-data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.