-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
61 lines (57 loc) · 1.2 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
version: "3.7"
services:
mysql:
container_name: mysql
build: ./mysql
restart: always
tty: true
environment:
MYSQL_DATABASE: ecommerce
MYSQL_USER: user
MYSQL_PASSWORD: user
MYSQL_ROOT_PASSWORD: admin
TZ: Asia/Seoul
command: # 명령어 실행
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_general_ci
- --range_optimizer_max_mem_size=16777216
ports:
- "3306:3306"
volumes:
- ./mysql/mysql_data:/var/lib/mysql
- ./mysql/sqls/:/docker-entrypoint-initdb.d/
networks:
- local-net
backend:
container_name: backend
restart: always
depends_on:
- mysql
volumes:
- ./backend:/backend
environment:
DJANGO_SETTINGS_MODULE: backend.settings.develop
env_file:
- .env
build: ./backend
ports:
- "8000:8000"
networks:
- local-net
nginx:
container_name: nginx
build: ./nginx
volumes:
- ./backend/.media_root:/backend/.media_root
- ./backend/static:/backend/static
ports:
- "80:80"
depends_on:
- backend
networks:
- local-net
#volumes:
# static:
networks:
local-net:
driver: bridge