-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.prod.yml
58 lines (54 loc) · 1.31 KB
/
docker-compose.prod.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
version: '3.7'
services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
target: prod
container_name: frontend
stdin_open: true # a trick to fix a unknown bug of creat-react-app
ports:
- "3000:3000"
backend:
build:
context: ./backend
dockerfile: Dockerfile
target: prod
container_name: backend
ports:
- "5000:5000"
env_file:
- ./backend/application/.env
depends_on:
- mysql
- redis
restart: "always"
mysql:
image: mysql:8.0.23
container_name: mysql
env_file:
- ./backend/application/.env
volumes:
- ./mount/mysql:/var/lib/mysql
ports:
- "3306:3306"
restart: always
nginx:
image: nginx:1.19.9
container_name: nginx
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
depends_on:
- frontend
- backend
restart: always
redis:
image: redis:6.2.1
container_name: redis
volumes:
- ./mount/redis:/data
ports:
- "6379:6379"
restart: always