Last active
November 11, 2020 18:20
-
-
Save serg-kovalev/6ab5f78bb55f95542d688f8fab61ca1d to your computer and use it in GitHub Desktop.
Setup kafka & zookeeper via docker-compose for local development needs. kafka1.test.local should point to your external (inet) ip address
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: '2' | |
services: | |
zookeeper: | |
image: wurstmeister/zookeeper | |
ports: | |
- "2181:2181" | |
kafka-1: | |
image: wurstmeister/kafka | |
ports: | |
- "9095:9092" | |
environment: | |
KAFKA_ADVERTISED_HOST_NAME: kafka1.test.local | |
KAFKA_ADVERTISED_PORT: 9095 | |
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 | |
KAFKA_LOG_DIRS: /kafka/logs | |
KAFKA_BROKER_ID: 100 | |
KAFKA_offsets_topic_replication_factor: 1 | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
- ./kafka/100:/kafka |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment