-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
72 lines (66 loc) · 1.23 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
71
72
version: '3'
services:
back-end:
build:
context: server
container_name: back-end
working_dir: /usr/src/app
networks:
- node-network
volumes:
- ./server:/usr/src/app
- /usr/src/app/node_modules
tty: true
environment:
- POSTGRES_PASSWORD=1234
- POSTGRES_PORT=5432
expose:
- "3000"
command: npm run start
depends_on:
- db
front-end:
build:
context: client
container_name: front-end
working_dir: /usr/src/app
networks:
- node-network
volumes:
- ./client:/usr/src/app
- /usr/src/app/node_modules
tty: true
expose:
- "5173"
command: npm run dev
depends_on:
- back-end
db:
image: postgres
container_name: db
restart: always
tty: true
volumes:
- ./data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=1234
expose:
- "5432"
networks:
- node-network
nginx:
build:
context: nginx
container_name: nginx
restart: always
tty: true
ports:
- "8080:80"
networks:
- node-network
depends_on:
- back-end
- front-end
networks:
node-network:
driver: bridge