/
docker-compose.yml
115 lines (107 loc) · 3.33 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
version: "3.9"
services:
spot.zookeeper.one:
image: docker.io/bitnami/zookeeper:3.7
container_name: spot.zookeeper.one
restart: "no"
hostname: spot.zookeeper.one
ports:
- "2282:2181"
environment:
ALLOW_ANONYMOUS_LOGIN: "yes"
networks:
- spot-network-one
volumes:
- zookeeper_data_one:/bitnami
spot.broker.one:
image: docker.io/bitnami/kafka:3
container_name: spot.broker.one
hostname: spot.broker.one
restart: "no"
ports:
- "9092:9092"
environment:
KAFKA_CFG_LISTENERS: "LISTENER_DOCKER_INTERNAL://:19092,LISTENER_DOCKER_EXTERNAL://:9092"
KAFKA_CFG_ADVERTISED_LISTENERS: "LISTENER_DOCKER_INTERNAL://spot.broker.one:19092,LISTENER_DOCKER_EXTERNAL://localhost:9092"
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: "LISTENER_DOCKER_INTERNAL:PLAINTEXT,LISTENER_DOCKER_EXTERNAL:PLAINTEXT"
KAFKA_CFG_ZOOKEEPER_CONNECT: "spot.zookeeper.one:2181"
KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR: "1"
KAFKA_CFG_PORT: "9092"
KAFKA_INTER_BROKER_LISTENER_NAME: "LISTENER_DOCKER_INTERNAL"
ALLOW_PLAINTEXT_LISTENER: "yes"
depends_on:
- spot.zookeeper.one
networks:
- spot-network-one
volumes:
- kafka_data_one:/bitnami
spot.zookeeper.two:
image: docker.io/bitnami/zookeeper:3.7
container_name: spot.zookeeper.two
restart: "no"
hostname: spot.zookeeper.two
ports:
- "2283:2181"
environment:
ALLOW_ANONYMOUS_LOGIN: "yes"
networks:
- spot-network-two
volumes:
- zookeeper_data_two:/bitnami
spot.broker.two:
image: docker.io/bitnami/kafka:3
container_name: spot.broker.two
hostname: spot.broker.two
restart: "no"
ports:
- "9093:9093"
environment:
KAFKA_CFG_LISTENERS: "LISTENER_DOCKER_INTERNAL://:19093,LISTENER_DOCKER_EXTERNAL://:9093"
KAFKA_CFG_ADVERTISED_LISTENERS: "LISTENER_DOCKER_INTERNAL://spot.broker.two:19093,LISTENER_DOCKER_EXTERNAL://localhost:9093"
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: "LISTENER_DOCKER_INTERNAL:PLAINTEXT,LISTENER_DOCKER_EXTERNAL:PLAINTEXT"
KAFKA_CFG_ZOOKEEPER_CONNECT: "spot.zookeeper.two:2181"
KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR: "1"
KAFKA_CFG_PORT: "9093"
KAFKA_INTER_BROKER_LISTENER_NAME: "LISTENER_DOCKER_INTERNAL"
ALLOW_PLAINTEXT_LISTENER: "yes"
depends_on:
- spot.zookeeper.two
networks:
- spot-network-two
volumes:
- kafka_data_two:/bitnami
spot.kafka-ui:
image: provectuslabs/kafka-ui:latest
container_name: spot.kafka-ui
restart: "no"
environment:
KAFKA_CLUSTERS_0_NAME: spot-one
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: spot.broker.one:19092
KAFKA_CLUSTERS_0_ZOOKEEPER: spot.zookeeper.one:2181
KAFKA_CLUSTERS_1_NAME: spot-two
KAFKA_CLUSTERS_1_BOOTSTRAPSERVERS: spot.broker.two:19093
KAFKA_CLUSTERS_1_ZOOKEEPER: spot.zookeeper.two:2181
ports:
- "8580:8080"
depends_on:
- spot.zookeeper.one
- spot.broker.one
- spot.zookeeper.two
- spot.broker.two
networks:
- spot-network-one
- spot-network-two
networks:
spot-network-one:
driver: bridge
spot-network-two:
driver: bridge
volumes:
zookeeper_data_one:
driver: local
kafka_data_one:
driver: local
zookeeper_data_two:
driver: local
kafka_data_two:
driver: local