-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (40 loc) · 1.11 KB
/
docker-compose.yml
File metadata and controls
43 lines (40 loc) · 1.11 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
services:
mongodb:
image: mongo:7.0
container_name: dungeons-mongodb
restart: unless-stopped
ports:
- "27017:27017"
volumes:
- mongodb_data:/data/db
environment:
- MONGO_INITDB_DATABASE=dungeons-and-developers
networks:
- app-network
backend:
build:
context: .
dockerfile: backend/Dockerfile
container_name: dungeons-backend
restart: unless-stopped
ports:
- "4000:4000"
environment:
- NODE_ENV=development
- MONGODB_URL=mongodb://mongodb:27017/dungeons-and-developers
depends_on:
- mongodb
volumes:
# Mount only backend source for hot reload
- ./backend/src:/app/backend/src
- ./backend/nodemon.json:/app/backend/nodemon.json
# Don't override node_modules
- /app/node_modules
- /app/backend/node_modules
networks:
- app-network
networks:
app-network:
driver: bridge
volumes:
mongodb_data: