-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (53 loc) · 1018 Bytes
/
docker-compose.yml
File metadata and controls
59 lines (53 loc) · 1018 Bytes
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
version: '3.8'
services:
mongo:
image: mongo:6.0
container_name: mongo
ports:
- "27017:27017"
volumes:
- mongo-data:/data/db
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 3
networks:
- app-network
backend:
build: ./backend
container_name: backend
volumes:
- /var/run/docker.sock:/var/run/docker.sock
expose:
- "5000"
env_file:
- ./backend/.env
depends_on:
- mongo
networks:
- app-network
frontend:
build: ./frontend
container_name: frontend
expose:
- "3000"
networks:
- app-network
nginx:
image: nginx:latest
container_name: nginx
ports:
- "80:80"
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- frontend
- backend
networks:
- app-network
volumes:
mongo-data:
networks:
app-network:
driver: bridge