-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
91 lines (83 loc) · 1.81 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#배포용, for production
version: "3"
services:
mysqldb:
# image: arm64v8/mysql:8.0.30
build: ./db
volumes:
- mysql_data:/var/lib/mysql
env_file:
- ./db/.env.db
# environment:
# MYSQL_DATABASE: "smtm"
# MYSQL_PASSWORD: "3690"
# MYSQL_ROOT_PASSWORD: "3690"
ports:
- "3306:3306"
container_name: mysqldb
backend:
build:
context: ./backend
args:
DJANGO_ALLOWED_HOSTS: "*"
DJANGO_SECRET_KEY: "*"
DJANGO_CORS_ORIGIN_WHITELIST: "*"
command: gunicorn backend.wsgi --bind 0.0.0.0:8000
ports:
- "8000:8000"
volumes:
- media_volume:/backend/mediafiles
- ./backend/:/backend/
expose:
- "8000"
env_file:
- ./db/.env.prod
depends_on:
- mysqldb
nginx:
build: ./nginx
ports:
- "80:8080"
volumes:
- static_volume:/backend/staticfiles
- media_volume:/backend/mediafiles
# - build_folder:/var/www/frontend
depends_on:
- backend
# - frontend
volumes:
mysql_data:
static_volume:
media_volume:
build_folder:
# frontend:
# build:
# context: ./frontend
# args:
# API_URL: "*"
# environment:
# - REACT_APP_BACKEND_URL=http://localhost
# volumes:
# - ./frontend/:/frontend
# - build_folder:/frontend/build
# - ./frontend/node_modules/:/frontend/node_modules
# tty: true
#
# nginx 컨테이너(서버)
# nginx:
# build: ./nginx
# ports:
# - 80:8080
# volumes:
# - static_volume:/backend/staticfiles
# - media_volume:/backend/mediafiles
# - build_folder:/var/www/frontend
# depends_on:
# - backend
# - frontend
# 컨테이너 내려도 데이터 유지되도록 함
#volumes:
# postgres_data:
# static_volume:
# media_volume:
# build_folder: