-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yaml
75 lines (70 loc) · 2.11 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
services:
reverse-proxy:
image: traefik:3.2
command: --api.insecure=true --providers.docker=true --entrypoints.web.address=:80
ports:
- 80:80
volumes:
- /var/run/docker.sock:/var/run/docker.sock
mongodb:
image: mongo:4.2
volumes:
- mongodb_data:/data/db
- ./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:
- ./seed_db/seed:/seed
- ./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:
image: ghcr.io/paulscherrerinstitute/scilog/be
depends_on:
mongodb:
condition: service_healthy
volumes:
# uncomment and edit the ./be/oidc.json to enable oidc
# for keycloak get your config values from: YOURKC_URL/realms/YOUR_REALM/.well-known/openid-configuration or YOURKC_URL/auth/realms/YOUR_REALM/.well-known/openid-configuration for older keycloak versions
# - ./be/oidc.json:/home/node/app/oidc.json
- ./be/datasource.json:/home/node/app/datasource.json
- ./be/functionalAccounts.json:/home/node/app/functionalAccounts.json
environment:
JWT_SECRET: jwt_secret
CHROME_BIN: /usr/bin/chromium
CHROME_PATH: /usr/lib/chromium/
BASE_PATH: /api/v1
profiles:
- be
labels:
- traefik.http.routers.backend.rule=PathPrefix(`/api/v1`)
frontend:
image: ghcr.io/paulscherrerinstitute/scilog/fe
volumes:
# replace simple_config.json volume mount
# with the one below to enable the oidc form
# - ./fe/config.json:/usr/share/nginx/html/assets/config.json
- ./fe/simple_config.json:/usr/share/nginx/html/assets/config.json
profiles:
- fe
labels:
- traefik.http.routers.frontend.rule=PathPrefix(`/`)
volumes:
mongodb_data:
driver: local