-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
70 lines (64 loc) · 1.32 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
58
59
60
61
62
63
64
65
66
67
68
69
70
version: '3'
services:
nginx:
image: nginx:latest
volumes:
- ./nginx:/etc/nginx/conf.d
depends_on:
- frontend # frontend depends on backend which depends on database
ports:
- "80:80"
networks:
- hireme-network
frontend:
image: frontend
container_name: frontend
restart: always
depends_on:
- backend
ports:
- "3000:3000"
networks:
- hireme-network
volumes:
- ./frontend/app:/app
- /app/node_modules # ignore local node_modules path
build:
context: frontend
dockerfile: dev.Dockerfile
env_file:
- frontend/app/.env.development
backend:
image: backend
container_name: backend
restart: always
stdin_open: true
depends_on:
- database
ports:
- "8080:8080"
networks:
- hireme-network
volumes:
- ./backend/app:/app
- /app/node_modules # ignore local node_modules path
build:
context: backend
dockerfile: dev.Dockerfile
env_file:
- backend/app/.env.development
database:
image: mongo:6.0
container_name: database
ports:
- '27017:27017'
networks:
- hireme-network
volumes:
- database-volume:/data/db
networks:
hireme-network:
driver: bridge
volumes:
database-volume:
driver: local