-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathdocker-compose.yaml
160 lines (152 loc) · 4.16 KB
/
docker-compose.yaml
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
version: "3"
services:
video-db:
image: debezium/postgres:15
container_name: video-db
hostname: video-db
environment:
POSTGRES_PASSWORD: root_password # please change it
POSTGRES_DB: spring-video
volumes:
- ./postgresql/video-db:/var/lib/postgresql/data
ports:
- 5433:5432
networks:
- local
worker-db:
image: debezium/postgres:15
container_name: worker-db
hostname: worker-db
environment:
POSTGRES_PASSWORD: root_password # please change it
POSTGRES_DB: spring-worker
volumes:
- ./postgresql/worker-db:/var/lib/postgresql/data
ports:
- 5434:5432
networks:
- local
minio:
image: minio/minio
container_name: minio
hostname: minio
restart: always
ports:
- 9000:9000 # api
- 9001:9001 # ui
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: root_password # please change it
volumes:
- ./minio/data:/data
command: server --console-address ':9001' /data
networks:
- local
zookeeper:
image: debezium/zookeeper:2.2
container_name: zookeeper
restart: always
ports:
- 2181:2181
- 2888:2888
- 3888:3888
environment:
JMXPORT: 9010
JMXHOST: zookeeper
volumes:
- ./zookeeper/data:/zookeeper/data
- ./zookeeper/txns:/zookeeper/txns
- ./zookeeper/log:/zookeeper/logs
- ./zookeeper/conf:/zookeeper/conf
networks:
- local
kafka1:
image: debezium/kafka:2.2
container_name: kafka1
restart: always
ports:
- 9092:9092
- 29092:29092
environment:
ZOOKEEPER_CONNECT: "zookeeper:2181"
BOOTSTRAP_SERVERS: "kafka1:29092,kafka2:29093"
ALLOW_PLAINTEXT_LISTENER: "yes"
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:29092,PLAINTEXT_HOST://0.0.0.0:9092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka1:29092,PLAINTEXT_HOST://localhost:9092
BROKER_ID: 1
ADVERTISED_HOST_NAME: kafka1
JMXPORT: 9011
JMXHOST: kafka1
depends_on:
- zookeeper
volumes:
- ./kafka/kafka-1/data:/kafka/data
- ./kafka/kafka-1/log:/kafka/log
- ./kafka/kafka-1/config:/kafka/config
networks:
- local
kafka2:
image: debezium/kafka:2.2
container_name: kafka2
restart: always
ports:
- 9093:9093
- 29093:29093
environment:
ZOOKEEPER_CONNECT: "zookeeper:2181"
BOOTSTRAP_SERVERS: "kafka1:29092,kafka2:29093"
ALLOW_PLAINTEXT_LISTENER: "yes"
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:29093,PLAINTEXT_HOST://0.0.0.0:9093
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka2:29093,PLAINTEXT_HOST://localhost:9093
BROKER_ID: 2
ADVERTISED_HOST_NAME: kafka2
JMXPORT: 9011
JMXHOST: kafka2
depends_on:
- zookeeper
volumes:
- ./kafka/kafka-2/data:/kafka/data
- ./kafka/kafka-2/log:/kafka/log
- ./kafka/kafka-2/config:/kafka/config
networks:
- local
kafka-ui:
image: provectuslabs/kafka-ui
container_name: kafka-ui
ports:
- "8070:8080"
restart: always
environment:
KAFKA_CLUSTERS_0_NAME: "local"
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: "kafka1:29092,kafka2:29093"
KAFKA_CLUSTERS_0_ZOOKEEPER: "zookeeper:2181"
KAFKA_CLUSTERS_0_METRICS_PORT: 9011
KAFKA_CLUSTERS_0_KAFKACONNECT_0_NAME: connect
KAFKA_CLUSTERS_0_KAFKACONNECT_0_ADDRESS: http://connect:8083
networks:
- local
connect:
image: debezium/connect:2.2
container_name: connect
restart: always
ports:
- 8071:8083
environment:
GROUP_ID: 1
CONFIG_STORAGE_TOPIC: connect_configs
OFFSET_STORAGE_TOPIC: connect_offsets
STATUS_STORAGE_TOPIC: connect_statuses
BOOTSTRAP_SERVERS: "kafka1:29092,kafka2:29093"
JMXPORT: 9012
JMXHOST: connect
depends_on:
- kafka1
- kafka2
networks:
- local
networks:
local: