-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.dev.yaml
88 lines (83 loc) · 2.2 KB
/
docker-compose.dev.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
version: "3.9"
services:
mongodb:
image: mongo:4.2
volumes:
- mongodb_data:/data/db
- ./config/mongo/rs-init.sh:/rs-init.sh:ro
command: [ "--replSet", "rs0", "--bind_ip_all" ]
healthcheck:
test: ./rs-init.sh
interval: 5s
profiles:
- be
mongodb_seed:
image: mongo:4.2
volumes:
- "./config/seed_db/seed:/seed"
- "./config/seed_db/mongo_import.sh:/mnt/mongo_import.sh"
command:
- "sh"
- "-c"
- "chmod u+x /mnt/mongo_import.sh && /mnt/mongo_import.sh"
user: "0:0"
depends_on:
- mongodb
environment:
- DATABASE=scilog
restart: on-failure
profiles:
- be
backend:
build:
context: ./sci-log-db/.
depends_on:
mongodb:
condition: service_healthy
volumes:
- ./sci-log-db:/home/node/app
- ./config/be/oidc.json:/home/node/app/oidc.json
- ./config/be/datasource.json:/home/node/app/datasource.json
# - ./config/be/roles.js:/home/node/app/dist/authentication-strategies/roles.js
- ./config/be/functionalAccounts.json:/home/node/app/functionalAccounts.json
- /home/node/app/node_modules
- /home/node/app/dist
environment:
JWT_SECRET: jwt_secret
CHROME_BIN: /usr/bin/chromium
CHROME_PATH: /usr/lib/chromium/
command: /bin/sh -c "while true; do sleep 600; done"
profiles:
- be
ports:
- 3000:3000
frontend:
build:
context: ./scilog/.
target: builder
environment:
CHROME_BIN: /usr/bin/chromium-browser
CHROME_PATH: /usr/lib/chromium/
volumes:
- ./scilog:/frontend
- ./config/fe/config.json:/frontend/src/assets/config.json
- /frontend/node_modules
- /frontend/dist
command: /bin/sh -c "apk add --no-cache chromium && while true; do sleep 600; done"
profiles:
- fe
ports:
- 4200:4200
python:
build:
context: ./importTools
volumes:
- ./importTools:/usr/src/app
- ./sdk/python/scilog:/usr/local/lib/python3.10/site-packages/scilog
# infinite loop to keep the container running
command: /bin/sh -c "while sleep 1000; do :; done"
profiles:
- py
volumes:
mongodb_data:
driver: local