-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
79 lines (69 loc) · 1.24 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
73
74
75
76
77
78
version: '3.1'
services:
db:
image: mysql
restart: always
volumes:
- data:/var/lib/mysql
- ./my.cnf:/etc/mysql/my.cnf
environment:
MYSQL_USER: root
MYSQL_DATABASE: tree_hust
MYSQL_ROOT_PASSWORD: 123456
ports:
- "3307:3306"
networks:
- internal_network
expose:
- 3306
backend:
build:
context: backend
# image: tree_hust_api
restart: always
ports:
- "8000:8000"
- "25:25"
networks:
- internal_network
depends_on:
- db
expose:
- 8000
# command: sh run.sh
frontend:
build:
context: website
# image: tree_hust_frontend
restart: always
ports:
- "3000:3000"
- "8080:80"
# - "443:443"
networks:
- internal_network
depends_on:
- backend
expose:
- 3000
- 80
nginx:
image: nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./build:/usr/share/nginx/html # need to be built first
- ./nginx.conf:/etc/nginx/conf.d/default.conf
networks:
- internal_network
depends_on:
- backend
- frontend
- db
networks:
internal_network:
driver: bridge
volumes:
data:
driver: local