Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
version: '2'
services:
zookeeper:
image: "confluentinc/cp-zookeeper:5.4.0"
hostname: zookeeper
ports:
- '32181:32181'
environment:
ZOOKEEPER_CLIENT_PORT: 32181
ZOOKEEPER_TICK_TIME: 2000
extra_hosts:
- "moby:127.0.0.1"
kafka:
image: "confluentinc/cp-enterprise-kafka:5.4.0"
hostname: kafka
ports:
- '9092:9092'
- '29092:29092'
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:32181
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092
KAFKA_METRIC_REPORTERS: io.confluent.metrics.reporter.ConfluentMetricsReporter
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
CONFLUENT_METRICS_REPORTER_BOOTSTRAP_SERVERS: kafka:29092
CONFLUENT_METRICS_REPORTER_ZOOKEEPER_CONNECT: zookeeper:32181
CONFLUENT_METRICS_REPORTER_TOPIC_REPLICAS: 1
CONFLUENT_METRICS_ENABLE: 'false'
CONFLUENT_SUPPORT_CUSTOMER_ID: 'anonymous'
extra_hosts:
- "moby:127.0.0.1"
schema-registry:
image: "confluentinc/cp-schema-registry:latest"
hostname: schema-registry
depends_on:
- zookeeper
- kafka
ports:
- '8081:8081'
environment:
SCHEMA_REGISTRY_HOST_NAME: schema-registry
SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL: zookeeper:32181
extra_hosts:
- "moby:127.0.0.1"
kafdrop:
image: "obsidiandynamics/kafdrop"
ports:
- '9000:9000'
environment:
KAFKA_BROKERCONNECT: kafka:29092
JVM_OPTS: "-Xms32M -Xmx64M"
SERVER_SERVLET_CONTEXTPATH: "/"
depends_on:
- kafka
# ksql-server:
# image: "confluentinc/cp-ksql-server:5.4.0"
# depends_on:
# - kafka
# - schema-registry
# ports:
# - '8088:8088'
# environment:
# KSQL_BOOTSTRAP_SERVERS: kafka:29092
# KSQL_LISTENERS: http://0.0.0.0:8088
# KSQL_KSQL_SCHEMA_REGISTRY_URL: http://schema-registry:8081
#
# rest-proxy:
# image: "confluentinc/cp-kafka-rest:5.4.0"
# hostname: rest-proxy
# ports:
# - '8082:8082'
# depends_on:
# - kafka
# - schema-registry
# environment:
# KAFKA_REST_HOST_NAME: rest-proxy
# KAFKA_REST_BOOTSTRAP_SERVERS: 'kafka:29092'
# KAFKA_REST_LISTENERS: "http://0.0.0.0:8082"
# KAFKA_REST_SCHEMA_REGISTRY_URL: 'http://schema-registry:8081'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment