-
Notifications
You must be signed in to change notification settings - Fork 14
/
docker-compose.yml
57 lines (52 loc) · 1.41 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
version: "3.9"
services:
# front (web UI)
frontend:
container_name: frontend
build: ./web-frontend
volumes:
- "./web-frontend:/app" # bind mount for hot reload
- "node_modules:/app/node_modules"
environment:
- "CHOKIDAR_USEPOLLING=true" # apparently needed hot reload
- "PROXY=http://backend:8081"
ports:
- "8080:8080"
# backend (API + Metrics)
backend:
container_name: backend
build: ./web-backend
ports:
- "8081:8081"
environment:
- "GITHUB_TOKEN=$GITHUB_TOKEN" # an optional PAT for Github
- "CARGO_HOME=/cargo" # used with a volume to persist cargo stuff
- "RUST_BACKTRACE=1"
- "RUST_LOG=info"
- "ROCKET_ADDRESS=0.0.0.0"
- "ROCKET_PORT=8081"
- "MONGODB_URI=mongodb://root:password@mongo:27017"
volumes:
- cargo:/cargo # persist cargo dependencies and tools
- repos:/app/metrics/repos # persist the cloned git repositories
# database
mongo:
image: mongo:4.4.2
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: password
ports:
- 27017:27017 # expose them for smooth dev'ing
# database UI for testing
mongo-express:
image: mongo-express:0.54.0
ports:
- 8082:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: password
# volumes
volumes:
cargo:
repos:
node_modules: