forked from akka/alpakka-kafka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
26 lines (26 loc) · 1.03 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# See dockerhub for different versions of kafka and zookeeper
# https://hub.docker.com/r/wurstmeister/kafka/
# https://hub.docker.com/r/wurstmeister/zookeeper/
version: '2.2'
services:
zookeeper:
image: wurstmeister/zookeeper:3.4.6
ports:
- "2181:2181"
kafka:
scale: ${KAFKA_SCALE:-1}
image: wurstmeister/kafka:1.1.0
ports:
- "9094"
environment:
HOSTNAME_COMMAND: "docker info | grep ^Name: | cut -d' ' -f 2"
PORT_COMMAND: "docker port `hostname` 9094 | cut -d: -f 2"
KAFKA_ADVERTISED_LISTENERS: INSIDE://:9092,OUTSIDE://_{HOSTNAME_COMMAND}:_{PORT_COMMAND}
KAFKA_LISTENERS: INSIDE://:9092,OUTSIDE://:9094
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_LEADER_IMBALANCE_CHECK_INTERVAL_SECONDS: 1 # default was 300 (5 minutes)
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: ${KAFKA_SCALE:-1}
volumes:
- /var/run/docker.sock:/var/run/docker.sock