-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
524 lines (496 loc) · 15.4 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
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
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
version: "3.7"
services:
###########################################################################
####### DB SERVICES #######
###########################################################################
postgres:
image: postgres:11.7-alpine
ports:
- "5432:5432"
volumes:
- ./pg-init-scripts:/docker-entrypoint-initdb.d
- ./volumes/postgres:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_MULTIPLE_DATABASES=kratos,keto,kavach,dega,hukz
networks:
- dega
#########################################################################
##### MINIO #######
#########################################################################
minio:
image: minio/minio
ports:
- "9000:9000"
- "9002:9002"
volumes:
- ~/factly/dega/minio/data:/export
- ~/factly/dega/minio/config:/root/.minio
environment:
- MINIO_ACCESS_KEY=miniokey
- MINIO_SECRET_KEY=miniosecret
networks:
- dega
command: server -console-address :9002 /export
createbuckets:
image: minio/mc
depends_on:
- minio
volumes:
- ./wait-for-it.sh:/usr/local/bin/wait-for-it.sh
networks:
- dega
entrypoint: >
/bin/sh -c " apk add --no-cache bash; wait-for-it.sh minio:9000 -- echo 'Minio is up. Creating the bucket!!'; /usr/bin/mc config host add myminio http://minio:9000 miniokey miniosecret; /usr/bin/mc mb myminio/dega; /usr/bin/mc anonymous set public myminio/dega; exit 0; "
###########################################################################
####### IFRAMELY #######
###########################################################################
iframely:
image: factly/iframely:v1.5.0-102820
ports:
- "8061:8061"
volumes:
- ./iframely/config.local.js:/iframely/config.local.js
networks:
- dega
###########################################################################
####### IMGPROXY #######
###########################################################################
imgproxy:
image: darthsim/imgproxy:v2.15.0
ports:
- 8080:8080
environment:
- IMGPROXY_BASE_URL=http://minio:9000/
- IMGPROXY_TTL=31536000
networks:
- dega
###########################################################################
####### NGINX #######
###########################################################################
nginx:
image: nginx:1.19.0-alpine
ports:
- 7001:80
volumes:
- ./nginx:/etc/nginx/conf.d
restart: unless-stopped
depends_on:
- imgproxy
networks:
- dega
###########################################################################
####### UPLOAD SERVICES #######
###########################################################################
companion:
image: transloadit/companion:sha-e80a7f7
ports:
- "3020:3020"
env_file:
- ./companion/.env
###########################################################################
####### SMTP SERVICES #######
###########################################################################
mailslurper:
image: oryd/mailslurper:latest-smtps
ports:
- "4436:4436"
- "4437:4437"
networks:
- dega
###########################################################################
####### SEARCH SERVICES #######
###########################################################################
meilisearch:
image: getmeili/meilisearch:v0.28.0
ports:
- "7700:7700"
volumes:
- ~/factly/dega/meilisearch-0-28-0/data.ms/:/data.ms
environment:
# To put an upper limit of 100MB for the payload size during indexing
- MEILI_HTTP_PAYLOAD_SIZE_LIMIT=104857600
- MEILI_MASTER_KEY=password
networks:
- dega
###########################################################################
####### KRATOS, KETO AND OATHKEEPER #######
###########################################################################
kratos-migrate:
depends_on:
- postgres
image: oryd/kratos:v0.10.1
environment:
- DSN=postgres://postgres:postgres@postgres:5432/kratos?sslmode=disable
volumes:
- type: bind
source: ./kratos/config
target: /etc/config/kratos
command: -c /etc/config/kratos/kratos.yml migrate sql -e --yes
restart: on-failure
networks:
- dega
keto-migrate:
image: oryd/keto:v0.9.0-alpha.0
environment:
- DSN=postgres://postgres:postgres@postgres:5432/keto?sslmode=disable
- LOG_LEVEL=debug
depends_on:
- postgres
volumes:
- type: bind
source: ./keto
target: /etc/config/keto
# command: namespace migrate legacy -c "/etc/config/keto/keto.yml" --yes
command: migrate up -c "/etc/config/keto/keto.yml" --yes
restart: on-failure
networks:
- dega
keto:
depends_on:
- keto-migrate
image: oryd/keto:v0.9.0-alpha.0
ports:
- "4466:4466" # read
- "4467:4467" # write
- "4468:4468" # metric
environment:
- LOG_LEVEL=debug
volumes:
- type: bind
source: ./keto
target: /etc/config/keto
command: serve -c "/etc/config/keto/keto.yml"
networks:
- dega
kratos:
depends_on:
- kratos-migrate
image: oryd/kratos:v0.10.1
ports:
- "4433:4433" # public
- "4434:4434" # admin
environment:
- DSN=postgres://postgres:postgres@postgres:5432/kratos?sslmode=disable
volumes:
- type: bind
source: ./kratos/config
target: /etc/config/kratos
command: serve -c /etc/config/kratos/kratos.yml --dev
restart: unless-stopped
networks:
- dega
oathkeeper:
image: oryd/oathkeeper:latest-alpine
depends_on:
- kratos
ports:
- "4455:4455"
- "4456:4456"
environment:
- LOG_LEVEL=debug
volumes:
- type: bind
source: ./oathkeeper
target: /etc/config/oathkeeper
command: serve proxy -c "/etc/config/oathkeeper/.oathkeeper.yml"
restart: on-failure
networks:
- dega
###########################################################################
######## CACHE SERVICES #######
###########################################################################
redis:
image: redis
ports:
- 6379:6379
volumes:
- ~/factly/dega/redis:/data
command: redis-server --appendonly yes --requirepass redispass
networks:
- dega
###########################################################################
####### KAVACH #######
###########################################################################
kavach-server:
depends_on:
- postgres
- keto
- kratos
- kavach-migrate
ports:
- 5001:8000
image: factly/kavach-server:0.33.2
volumes:
- type: bind
source: ./volumes/kavach-server/data
target: /app/data
environment:
- WAIT_HOSTS=postgres:5432, kratos:4434 , keto:4466
- KAVACH_DATABASE_HOST=postgres
- KAVACH_DATABASE_USER=postgres
- KAVACH_DATABASE_PASSWORD=postgres
- KAVACH_DATABASE_NAME=kavach
- KAVACH_DATABASE_PORT=5432
- KAVACH_DATABASE_SSL_MODE=disable
- KAVACH_KETO_READ_API_URL=http://keto:4466
- KAVACH_KETO_WRITE_API_URL=http://keto:4467
- KAVACH_KRATOS_ADMIN_URL=http://kratos:4434
- KAVACH_KRATOS_PUBLIC_URL=http://kratos:4433
- KAVACH_MODE=development
- KAVACH_USE_SQLITE=false
- KAVACH_SQLITE_DB_PATH=kavach.db
- KAVACH_IMAGEPROXY_URL=http://127.0.0.1:7001
- KAVACH_DOMAIN_NAME=http://127.0.0.1:4455/.factly/kavach/web
- KAVACH_DYNAMIC_FROM_EMAIL='kavach'
- KAVACH_MANDE_HOST=http://mande.factly.in
- KAVACH_DYNAMIC_MANDE_TEMPLATE_ID=1
- KAVACH_DYNAMIC_SENDGRID_API_KEY=SENDGRID_API_KEY
- KAVACH_ENABLE_MULTITENANCY=true
- KAVACH_DISABLE_REGISTRATION=false
- KAVACH_APPLICATION_NAME=Kavach
- KAVACH_DEFAULT_USER_PASSWORD=Data123@#
- KAVACH_DEFAULT_ORGANISATION_NAME=NEWSCHECKER
- KAVACH_ENABLE_IMGPROXY=false
- KAVACH_DYNAMIC_EMAIL_ENABLED=true
- KAVACH_BUCKET_NAME=login.factly.in
- KAVACH_SENDGRID_FROM_NAME=sumit
restart: unless-stopped
networks:
- dega
kavach-migrate:
depends_on:
- postgres
- keto
- kratos
image: factly/kavach-server:0.33.2
volumes:
- type: bind
source: ./volumes/kavach-server/data
target: /app/data
environment:
- WAIT_HOSTS=postgres:5432, kratos:4434 , keto:4466
- KAVACH_DATABASE_HOST=postgres
- KAVACH_DATABASE_USER=postgres
- KAVACH_DATABASE_PASSWORD=postgres
- KAVACH_DATABASE_NAME=kavach
- KAVACH_DATABASE_PORT=5432
- KAVACH_DATABASE_SSL_MODE=disable
- KAVACH_KETO_READ_API_URL=http://keto:4466
- KAVACH_KETO_WRITE_API_URL=http://keto:4467
- KAVACH_KRATOS_ADMIN_URL=http://kratos:4434
- KAVACH_KRATOS_PUBLIC_URL=http://kratos:4433
- KAVACH_MODE=development
- KAVACH_USE_SQLITE=false
- KAVACH_SQLITE_DB_PATH=kavach.db
- KAVACH_IMAGEPROXY_URL=http://127.0.0.1:7001
- KAVACH_DOMAIN_NAME=http://127.0.0.1:4455/.factly/kavach/web
- KAVACH_DYNAMIC_FROM_EMAIL='kavach'
- KAVACH_MANDE_HOST=http://mande.factly.in
- KAVACH_DYNAMIC_MANDE_TEMPLATE_ID=1
- KAVACH_DYNAMIC_SENDGRID_API_KEY=SENDGRID_API_KEY
- KAVACH_ENABLE_MULTITENANCY=true
- KAVACH_DISABLE_REGISTRATION=false
- KAVACH_APPLICATION_NAME=Kavach
- KAVACH_DEFAULT_USER_PASSWORD=Data123@#
- KAVACH_DEFAULT_ORGANISATION_NAME=NEWSCHECKER
- KAVACH_ENABLE_IMGPROXY=false
- KAVACH_DYNAMIC_EMAIL_ENABLED=true
- KAVACH_BUCKET_NAME=login.factly.in
- KAVACH_SENDGRID_FROM_NAME=sumit
entrypoint:
[
"/bin/sh",
"-c",
"/app/kavach-server migrate && /app/kavach-server create-super-org",
]
networks:
- dega
kavach-web:
image: factly/kavach-web:0.33.2-dev
volumes:
- type: bind
source: ./volumes/kavach-web/config.js
target: /app/public/config.js
environment:
- PUBLIC_URL=http://127.0.0.1:4455/.factly/kavach/web
- REACT_APP_PUBLIC_URL='http://127.0.0.1:4455/.factly/kavach/web';
- REACT_APP_KAVACH_TITLE='FACTLY';
- REACT_APP_COMPANION_URL='http://127.0.0.1:3020';
- REACT_APP_API_URL='http://127.0.0.1:4455/.factly/kavach/server';
- REACT_APP_KRATOS_PUBLIC_URL='http://127.0.0.1:4455/.ory/kratos/public';
- REACT_APP_ENABLE_MULTITENANCY='true';
- REACT_APP_DISABLE_REGISTRATION=false;
- REACT_APP_REDIRECT_SINGLE_APPLICATION_USERS=true;
- REACT_APP_LOGO_URL='https://images.factly.in/login/applications/logos/factly.png?rs:fill/h:60';
- REACT_APP_ENABLE_IMGPROXY=false;
restart: unless-stopped
networks:
- dega
###########################################################################
####### DEGA STUDIO UI, SERVER AND DB #######
###########################################################################
dega-server:
depends_on:
- postgres
- keto
- kratos
- kavach-server
ports:
- 7789:8000
- 7788:8001
- 7787:8002
build:
context: ./server
dockerfile: Dockerfile.dev
environment:
- WAIT_HOSTS=postgres:5432, kratos:4434 , keto:4466, kavach-server:8000
volumes:
- type: bind
source: ./server
target: /app
restart: unless-stopped
networks:
- dega
dega-migrate:
depends_on:
- postgres
- keto
- kratos
- kavach-server
build:
context: ./server
dockerfile: Dockerfile.migrate
environment:
- WAIT_HOSTS=postgres:5432, kratos:4434 , keto:4466, kavach-server:8000
volumes:
- type: bind
source: ./server
target: /app
networks:
- dega
hukz:
depends_on:
- dega-server
ports:
- 7790:8000
image: factly/hukz
environment:
- WAIT_HOSTS=postgres:5432, dega-server:8000
- HUKZ_DATABASE_HOST=postgres
- HUKZ_DATABASE_USER=postgres
- HUKZ_DATABASE_PASSWORD=postgres
- HUKZ_DATABASE_NAME=hukz
- HUKZ_DATABASE_PORT=5432
- HUKZ_DATABASE_SSL_MODE=disable
- HUKZ_NATS_URL=nats://nats:4222
- HUKZ_NATS_USER_NAME=natsuser
- HUKZ_NATS_USER_PASSWORD=natspassword
- HUKZ_QUEUE_GROUP=dega
- HUKZ_DEGA_TO_GOOGLE_CHAT=true
- HUKZ_DEGA_TO_SLACK=false
- HUKZ_MODE=development
restart: unless-stopped
networks:
- dega
hukz-migrate:
depends_on:
- dega-server
image: factly/hukz
environment:
- WAIT_HOSTS=postgres:5432, dega-server:8000
- HUKZ_DATABASE_HOST=postgres
- HUKZ_DATABASE_USER=postgres
- HUKZ_DATABASE_PASSWORD=postgres
- HUKZ_DATABASE_NAME=hukz
- HUKZ_DATABASE_PORT=5432
- HUKZ_DATABASE_SSL_MODE=disable
- HUKZ_NATS_URL=nats://nats:4222
- HUKZ_NATS_USER_NAME=natsuser
- HUKZ_NATS_USER_PASSWORD=natspassword
- HUKZ_QUEUE_GROUP=dega
- HUKZ_DEGA_TO_GOOGLE_CHAT=true
- HUKZ_DEGA_TO_SLACK=false
- HUKZ_MODE=development
entrypoint: /app/hukz migrate
networks:
- dega
nats:
depends_on:
- dega-server
- hukz
ports:
- 4222:4222
- 8222:8222
command: "--user natsuser --pass natspassword"
image: nats:latest
restart: unless-stopped
networks:
- dega
dega-studio:
build:
context: ./studio
dockerfile: Dockerfile
no_cache: true
args:
- CACHEBUST
environment:
- PUBLIC_URL=http://127.0.0.1:4455/.factly/dega/studio
- REACT_APP_KAVACH_PUBLIC_URL=http://127.0.0.1:4455/.factly/kavach/web
- REACT_APP_SACH_API_URL=https://sach-server.factly.in
- WDS_SOCKET_HOST=127.0.0.1
- CHOKIDAR_USEPOLLING=true
- WATCHPACK_POLLING=true
- NODE_ENV=development
ports:
- "3000:3000"
volumes:
- type: bind
source: ./studio
target: /app
- /app/node_modules
restart: unless-stopped
networks:
- dega
dega-api:
depends_on:
- postgres
ports:
- 9001:8000
build:
context: ./api
dockerfile: Dockerfile
environment:
- CONFIG_FILE=dega-api.yml
- WAIT_HOSTS=postgres:5432
volumes:
- type: bind
source: ./api
target: /app
restart: unless-stopped
networks:
- dega
dega-templates:
depends_on:
- postgres
ports:
- 7791:8000
build:
context: ./templates
dockerfile: Dockerfile
environment:
- WAIT_HOSTS=postgres:5432
volumes:
- type: bind
source: ./templates
target: /app
restart: unless-stopped
networks:
- dega
networks:
dega: