Created
September 15, 2019 19:30
-
-
Save devshawn/8e8397798b9e4a6c7fd299d723338084 to your computer and use it in GitHub Desktop.
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' | |
services: | |
zookeeper: | |
image: zookeeper:3.4.9 | |
hostname: zookeeper | |
ports: | |
- "2181:2181" | |
environment: | |
ZOO_MY_ID: 1 | |
ZOO_PORT: 2181 | |
ZOO_SERVERS: server.1=zookeeper:2888:3888 | |
volumes: | |
- ./data/zookeeper/data:/data | |
- ./data/zookeeper/datalog:/datalog | |
kafka2: | |
image: confluentinc/cp-kafka:5.3.0 | |
hostname: kafka2 | |
ports: | |
- "9092:9092" | |
environment: | |
KAFKA_ADVERTISED_LISTENERS: LISTENER_DOCKER_INTERNAL://kafka2:19092,LISTENER_DOCKER_EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9092 | |
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: LISTENER_DOCKER_INTERNAL:PLAINTEXT,LISTENER_DOCKER_EXTERNAL:PLAINTEXT | |
KAFKA_INTER_BROKER_LISTENER_NAME: LISTENER_DOCKER_INTERNAL | |
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181" | |
KAFKA_BROKER_ID: 2 | |
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 | |
volumes: | |
- ./data/kafka2/data:/var/lib/kafka/data | |
depends_on: | |
- zookeeper |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment