-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
47 lines (41 loc) · 793 Bytes
/
Copy pathdocker-compose.yaml
File metadata and controls
47 lines (41 loc) · 793 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
version: '3.8'
services:
mongodb:
image: mongo:6
container_name: mongo
ports:
- "27018:27017"
volumes:
- mongo-data:/data/db
networks:
- app-network
backend:
build:
context: ./backend
container_name: backend
ports:
- "3001:3001"
env_file:
- ./backend/.env
depends_on:
- mongodb
command: sh -c "until nc -z mongo 27017; do echo '⏳ Waiting for MongoDB...'; sleep 1; done && npm start"
networks:
- app-network
frontend:
build:
context: ./frontend
container_name: frontend
ports:
- "3000:3000"
env_file:
- ./frontend/.env
depends_on:
- backend
networks:
- app-network
volumes:
mongo-data:
networks:
app-network:
driver: bridge