-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (49 loc) · 1.16 KB
/
docker-compose.yml
File metadata and controls
52 lines (49 loc) · 1.16 KB
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
version: "3.7"
services:
backend:
container_name: backend
build:
context: ./backend-repo
args:
DJANGO_ALLOWED_HOSTS: "*"
DJANGO_SECRET_KEY: "*"
DJANGO_CORS_ORIGIN_WHITELIST: "*"
restart: unless-stopped
# command: python backend/manage.py runserver 0.0.0.0:8000 # nomal start
command: sh -c "cd backend/ && gunicorn wpyw.wsgi:application --bind 0.0.0.0:8000" # gunicorn start
volumes:
- ./backend-repo:/code
ports:
- 8000:8000
env_file:
- ./backend-repo/.env
# depends_on:
# - nginx
nginx:
container_name: nginx
build:
context: ./nginx
volumes:
# - ./wpyw/static:/static
- build_folder:/var/www/frontend
ports:
- 80:80
depends_on:
- backend
- frontend
frontend:
container_name: frontend
restart: on-failure
build:
context: ./frontend-repo/
dockerfile: Dockerfile
volumes:
# hot reload를 위해 mount
- ./frontend-repo:/usr/src/next
- /usr/src/next/node_modules
- /usr/src/next/.next
- build_folder:/frontend/build
ports:
- 5173:5173
volumes:
build_folder: null