-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
58 lines (54 loc) · 1.13 KB
/
docker-compose.yml
File metadata and controls
58 lines (54 loc) · 1.13 KB
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
services:
api:
build:
context: ./api
container_name: fastapi-server
ports:
- 8080:8080
restart: "on-failure"
command: bash -c "uvicorn api.main:app --host 0.0.0.0 --port 8080 --log-level debug"
deploy:
resources:
limits:
cpus: '4'
memory: 8G
depends_on:
- mongo
environment:
- MONGO_URL=mongodb://mongo:27017
- MONGO_DB=db
- LOAD_DB=YES
volumes:
- ./matches:/matches
networks:
- mongo
frontend:
build:
context: ./site
container_name: dota-frontend
ports:
- 5173:5173
restart: "on-failure"
depends_on:
- api
environment:
- API_URL=http://api:8080
networks:
- mongo
mongo:
image: mongo:latest
container_name: mongodb-container
restart: "on-failure"
ports:
- 27017:27017
networks:
- mongo
volumes:
- mongo-data:/data/mongo
# for unique query upon id_ that is steam user id with indexing
- ./api/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
volumes:
mongo-data:
networks:
mongo:
driver: bridge