Skip to content

Instantly share code, notes, and snippets.

@jinnabaalu
Created August 30, 2019 07:04
Show Gist options
  • Save jinnabaalu/8b07b689cee1f187245c65ee3cdce82e to your computer and use it in GitHub Desktop.
Save jinnabaalu/8b07b689cee1f187245c65ee3cdce82e to your computer and use it in GitHub Desktop.
Kafka Confluence Docker Compose
version: '2'
services:
zookeeper:
image: confluentinc/cp-zookeeper:5.3.0
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ZOOKEEPER_SYNC_LIMIT: 2
ports:
- 2181:2181
kafka:
image: confluentinc/cp-kafka:5.3.0
environment:
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_BROKER_ID: 2
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
# KAFKA_LISTENERS: PLAINTEXT://kafka:19092,LISTENER_DOCKER_EXTERNAL://kafka:9092
# KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:19092,LISTENER_DOCKER_EXTERNAL://${DOCKER_HOST_IP:-kafka}:9092
# KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,LISTENER_DOCKER_EXTERNAL:PLAINTEXT
# KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
# KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
# KAFKA_BROKER_ID: 1
# KAFKA_NUM_PARTITIONS: 1
# KAFKA_DEFAULT_REPLICATION_FACTOR: 1
# KAFKA_LOG4J_LOGGERS: "kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO"
# KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
# CONFLUENT_SUPPORT_CUSTOMER_ID: 'anonymous'
ports:
- 9092:9092
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment