Created
March 25, 2024 03:53
-
-
Save hendisantika/c3d4e033e377760223817c71ece29007 to your computer and use it in GitHub Desktop.
Kafka & Zoo Keeper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.9' | |
services: | |
zookeeper: | |
image: confluentinc/cp-zookeeper:latest | |
container_name: zookeeper | |
environment: | |
ZOOKEEPER_CLIENT_PORT: 2181 | |
ZOOKEEPER_TICK_TIME: 2000 | |
ports: | |
- "2181:2181" | |
schema-registry: | |
image: confluentinc/cp-schema-registry:latest | |
hostname: schema-registry | |
depends_on: | |
- kafka-broker-1 | |
ports: | |
- "8081:8081" | |
environment: | |
SCHEMA_REGISTRY_HOST_NAME: schema-registry | |
SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL: 'zookeeper:2181' | |
SCHEMA_REGISTRY_LISTENERS: http://schema-registry:8081 | |
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: PLAINTEXT://kafka-broker-1:9092,PLAINTEXT_INTERNAL://localhost:19092 | |
SCHEMA_REGISTRY_DEBUG: 'true' | |
kafka-broker-1: | |
image: confluentinc/cp-kafka:latest | |
hostname: kafka-broker-1 | |
ports: | |
- "19092:19092" | |
depends_on: | |
- zookeeper | |
environment: | |
KAFKA_BROKER_ID: 1 | |
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181' | |
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_INTERNAL:PLAINTEXT | |
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-broker-1:9092,PLAINTEXT_INTERNAL://localhost:19092 | |
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment