-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-core.yml
45 lines (42 loc) · 1.28 KB
/
docker-compose-core.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
version: "3"
networks:
kafka-net:
name: kafka-net
driver: bridge
services:
zookeeper:
image: docker.io/bitnami/zookeeper:3.8
container_name: zookeeper
restart: unless-stopped
networks:
- kafka-net
ports:
- "2181:2181"
# opening this on Windows might cause trouble
# volumes:
# - "./data/zookeeper-data:/bitnami"
environment:
ALLOW_ANONYMOUS_LOGIN: "yes"
kafka:
image: docker.io/bitnami/kafka:3
container_name: kafka
restart: unless-stopped
networks:
- kafka-net
ports:
- "9092:9092"
# opening this on Windows might cause trouble
# volumes:
# - "./data/kafka-data:/bitnami"
environment:
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: DOCKER_INTERNAL:PLAINTEXT,DOCKER_EXTERNAL:PLAINTEXT
KAFKA_CFG_LISTENERS: DOCKER_INTERNAL://:29092,DOCKER_EXTERNAL://:9092
KAFKA_CFG_ADVERTISED_LISTENERS: DOCKER_INTERNAL://kafka:29092,DOCKER_EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9092
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: DOCKER_INTERNAL
KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_CFG_BROKER_ID: 1
KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: "true"
ALLOW_PLAINTEXT_LISTENER: "yes"
depends_on:
- zookeeper