-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yaml
64 lines (57 loc) · 1.02 KB
/
docker-compose.yaml
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
version: '3'
services:
front-prod:
build:
context: ./client
dockerfile: Dockerfile
environment:
NODE_ENV: production
depends_on:
- server-prod
volumes:
- ./client:/client
- /client/node_modules
networks:
- frontend
ports:
- "3000:80"
server-prod:
build:
context: ./server
dockerfile: Dockerfile
environment:
NODE_ENV: production
ports:
- "80:80"
depends_on:
- db-prod
- mongo-prod
networks:
- frontend
- backend
volumes:
- ./server:/server
- /server/node_modules
mongo-prod:
image: mongo:latest
networks:
- backend
ports:
- "27017:27017"
db-prod:
image: postgres:14.3-alpine
environment:
- POSTGRES_PASSWORD=password
- POSTGRES_USER=postgres
- POSTGRES_DB=mangoose-prod
networks:
- backend
ports:
- "5432:5432"
volumes:
server-prod:
networks:
frontend:
driver: bridge
backend:
driver: bridge