Skip to content

Instantly share code, notes, and snippets.

@srimaln91
Last active September 6, 2021 18:14
Show Gist options
  • Save srimaln91/5c40b9165b6d984dbf6bc274a2444bf9 to your computer and use it in GitHub Desktop.
Save srimaln91/5c40b9165b6d984dbf6bc274a2444bf9 to your computer and use it in GitHub Desktop.
Docker compose file for Kafka, Zookeeper, Confluent Schema Registry
---
version: '2'
services:
zookeeper:
container_name: zookeeper
image: confluentinc/cp-zookeeper:latest
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
kafka:
container_name: kafka
image: confluentinc/cp-kafka:latest
depends_on:
- zookeeper
ports:
- 9092:9092
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
schema-registry:
container_name: schema-registry
image: confluentinc/cp-schema-registry:latest
depends_on:
- kafka
ports:
- 8081:8081
environment:
SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL: zookeeper:2181
SCHEMA_REGISTRY_HOST_NAME: schema-registry
schema-registry-ui:
container_name: schema-registry-ui
image: landoop/schema-registry-ui:latest
depends_on:
- schema-registry
ports:
- 8000:8000
environment:
SCHEMAREGISTRY_URL: http://schema-registry:8081
PROXY: "true"
ALLOW_GLOBAL: "true"
ALLOW_TRANSITIVE: "true"
ALLOW_DELETION: "true"
READONLY_MODE: "false"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment