-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathdocker-compose.yml
80 lines (75 loc) · 2.55 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
# version: "3"
services:
mongodb:
container_name: brainlife_ezbids-mongodb
image: mongo:4.4.15
platform: linux/amd64
volumes:
- /data/db
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo localhost:27017/test --quiet
interval: 10s
timeout: 10s
retries:
5
ports:
- 27417:27017 #for local debugging
api:
container_name: brainlife_ezbids-api
build: .
platform: linux/amd64
volumes:
- ./api:/app/api
- /tmp:/tmp
depends_on:
mongodb:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8082/health"]
working_dir: /app/api
command:
./dev.sh
environment:
MONGO_CONNECTION_STRING: mongodb://mongodb:27017/ezbids
BRAINLIFE_AUTHENTICATION: ${BRAINLIFE_AUTHENTICATION}
ports:
- 8082:8082 #localhost runs on local browser to it needs to access api via host port
handler:
container_name: brainlife_ezbids-handler
build: ./handler
platform: linux/amd64
volumes:
- .:/app
- /tmp:/tmp
depends_on:
mongodb:
condition: service_healthy
api:
condition: service_healthy
environment:
MONGO_CONNECTION_STRING: mongodb://mongodb:27017/ezbids
tty: true #turn on color for bids-validator output
command: pm2 start handler.js --attach --watch --ignore-watch "ui **/node_modules"
ui:
container_name: brainlife_ezbids-ui
build: ./ui
platform: linux/amd64
volumes:
- ./ui/src:/ui/src #don't copy node_modules which might be compiled for mac (vite won't work)
environment:
VITE_APIHOST: http://localhost:8082
VITE_BRAINLIFE_AUTHENTICATION: ${BRAINLIFE_AUTHENTICATION}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
ports:
- 3000:3000 #vite wants to be exposed on the host for HMR?
# by default this is not enabled, need to run docker compose with --profile development to enable this service
telemetry:
container_name: brainlife_ezbids-telemetry
build: ./telemetry
platform: linux/amd64
depends_on:
- mongodb
profiles: ["development"]
ports:
- 8000:8000 #for local debugging