-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
355 lines (335 loc) · 7.54 KB
/
docker-compose.yml
File metadata and controls
355 lines (335 loc) · 7.54 KB
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
volumes:
metadata_data: {}
middle_var: {}
historical_var: {}
broker_var: {}
coordinator_var: {}
router_var: {}
druid_shared: {}
db: {}
minio_data: {}
kb: {}
db_backup: {}
druid_db_backup: {}
backrest_data: {}
backrest_config: {}
backrest_cache: {}
target_volume: {}
vault_data: {}
rag_models: {}
services:
postgres:
container_name: postgres
image: postgres:latest
volumes:
- metadata_data:/var/lib/postgresql/data
# environment:
# POSTGRES_HOST_AUTH_METHOD: trust
env_file:
- database/environment
profiles:
- database
- not-db-init
zookeeper:
container_name: zookeeper
image: zookeeper:3.5.10
platform: linux/amd64
ports:
- "12181:2181"
environment:
- ZOO_MY_ID=1
#- ZOO_SERVERS=server.1=zookeeper:2888:3888 # Set only a single server
profiles:
- database
- not-db-init
coordinator:
image: apache/druid:31.0.0
container_name: coordinator
platform: linux/amd64
volumes:
- druid_shared:/opt/shared
- coordinator_var:/opt/druid/var
- ./database/druid/upload:/druid/upload
depends_on:
- zookeeper
- postgres
ports:
- "18081:8081"
command:
- coordinator
env_file:
- database/environment
profiles:
- database
- not-db-init
broker:
image: apache/druid:31.0.0
container_name: broker
platform: linux/amd64
volumes:
- broker_var:/opt/druid/var
depends_on:
- zookeeper
- postgres
- coordinator
ports:
- "18082:8082"
command:
- broker
env_file:
- database/environment
profiles:
- database
- not-db-init
historical:
image: apache/druid:31.0.0
container_name: historical
platform: linux/amd64
volumes:
- druid_shared:/opt/shared
- historical_var:/opt/druid/var
depends_on:
- zookeeper
- postgres
- coordinator
ports:
- "18083:8083"
command:
- historical
env_file:
- database/environment
profiles:
- database
- not-db-init
middlemanager:
image: apache/druid:31.0.0
container_name: middlemanager
platform: linux/amd64
volumes:
- druid_shared:/opt/shared
- middle_var:/opt/druid/var
- ./database/druid/upload:/druid/upload
depends_on:
- zookeeper
- postgres
- coordinator
ports:
- "18091:8091"
- "18100-18105:8100-8105"
command:
- middleManager
env_file:
- database/environment
profiles:
- database
- not-db-init
router:
image: apache/druid:31.0.0
container_name: router
platform: linux/amd64
volumes:
- router_var:/opt/druid/var
depends_on:
- zookeeper
- postgres
- coordinator
ports:
- "18888:8888"
command:
- router
env_file:
- database/environment
profiles:
- database
- not-db-init
healthcheck:
test: ["CMD", "wget", "-qO-", "http://router:8888/status/health"]
interval: 10s
timeout: 5s
retries: 5
db:
container_name: db
env_file:
- database/.env
image: postgres:latest
ports:
- "15432:5432"
# environment:
# POSTGRES_HOST_AUTH_METHOD: trust
volumes:
- db:/var/lib/postgresql/data
profiles:
- database
- not-db-init
minio:
container_name: minio
image: quay.io/minio/minio:latest
volumes:
- minio_data:/data
ports:
- 19000:9000
- 19001:9001
env_file:
- database/.env
command: minio server /data
profiles:
- database
- not-db-init
db-init:
image: ghcr.io/belgio99/smartfactory/db-init:latest
build:
context: ./database
dockerfile: Dockerfile
env_file:
- database/.env
profiles:
- database
volumes:
- ./database/druid/upload:/druid/upload
depends_on:
router:
condition: service_healthy
kb:
build:
context: ./kb
dockerfile: Dockerfile
image: ghcr.io/belgio99/smartfactory/kb:latest
volumes:
- kb:/KB/storage
platform: linux/amd64
ports:
- "10010:8000"
profiles:
- kb
- not-db-init
env_file:
- database/.env
data-processing:
build:
context: ./data-processing
dockerfile: Dockerfile
image: ghcr.io/belgio99/smartfactory/data-processing:latest
ports:
- "10030:8000"
profiles:
- data-processing
- not-db-init
env_file:
- database/.env
- data-processing/.env
depends_on:
router:
condition: service_healthy
api:
image: ghcr.io/belgio99/smartfactory/api:latest
build:
context: ./api
dockerfile: Dockerfile
ports:
- "10040:8000"
env_file:
- api/.env
- api/environment
depends_on:
- smtp
- router
profiles:
- api
- not-db-init
smtp:
image: mailhog/mailhog
platform: linux/amd64
ports:
- "11025:1025"
- "18025:8025"
environment:
MH_OUTGOING_SMTP_USERNAME: "noreply@smartfactory.com"
MH_OUTGOING_SMTP_PASSWORD: "SmartAppPassword123"
profiles:
- api
- not-db-init
rag:
image: ghcr.io/belgio99/smartfactory/rag:latest
build:
context: ./rag
dockerfile: Dockerfile
env_file:
- rag/.env
volumes:
- kb:/docs/kb
- rag_models:/app/models
ports:
- "10050:8000"
profiles:
- rag
- not-db-init
gui-panel:
image: ghcr.io/belgio99/smartfactory/gui-panel:latest
build:
context: ./gui-panel
dockerfile: Dockerfile
env_file:
- gui-panel/.env
ports:
- "10060:8080"
profiles:
- gui-panel
- not-db-init
kpi-engine:
image: ghcr.io/belgio99/smartfactory/kpi-engine:latest
build:
context: ./kpi-engine
dockerfile: Dockerfile
ports:
- "10080:8000"
profiles:
- kpi-engine
- not-db-init
env_file:
- kpi-engine/.env
depends_on:
router:
condition: service_healthy
backrest:
image: garethgeorge/backrest:latest
container_name: backrest
hostname: backrest
volumes:
- backrest_data:/data
- ./database/backrest/config:/config
- backrest_cache:/cache
- druid_shared:/userdata/druid_shared # [optional] mount local paths to backup here.
- db_backup:/userdata/db_backup
- druid_db_backup:/userdata/druid_db_backup
- minio_data:/userdata/minio_data
- target_volume:/target_volume
# - /MY-REPOS:/repos # [optional] mount repos if using local storage, not necessary for remotes e.g. B2, S3, etc.
environment:
- BACKREST_DATA=/data # path for backrest data. restic binary and the database are placed here.
- BACKREST_CONFIG=/config/config.json # path for the backrest config file.
- XDG_CACHE_HOME=/cache # path for the restic cache which greatly improves performance.
- TZ=Europe/Rome # set the timezone for the container, used as the timezone for cron jobs.
restart: unless-stopped
ports:
- 9898:9898
profiles:
- database
- not-db-init
env_file:
- database/backrest/.env
vault: #it is in dev mode!
image: hashicorp/vault
container_name: vault
volumes:
- vault_data:/vault/file
environment:
VAULT_ADDR: "http://0.0.0.0:8200"
VAULT_STORAGE_BACKEND: "file"
ports:
- "18200:8200"
profiles:
- database
logging:
driver: "json-file"
options:
max-file: "1"