-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
34 lines (32 loc) · 906 Bytes
/
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
version: '3.9'
services:
db:
image: mysql:8.0
ports:
- "3306:3306"
restart: unless-stopped
environment:
MYSQL_DATABASE: core
MYSQL_USER: $MYSQL_USER
MYSQL_PASSWORD: $MYSQL_PASSWORD
MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PASSWORD
command:
[
--character-set-server=utf8mb4,
--collation-server=utf8mb4_unicode_ci,
--lower-case-table-names=1,
--default-authentication-plugin=mysql_native_password
]
volumes:
- ./db:/var/lib/mysql
app:
build: .
restart: unless-stopped
ports:
- '8000:8000'
environment:
CORE_SETTINGS_LOCAL_SETTINGS_PATH: 'local/settings.prod.py'
CORE_SETTINGS_DATABASES: '{"default": {"HOST":"db", "USER":"${MYSQL_USER}", "PASSWORD":"${MYSQL_PASSWORD}"}}'
volumes:
- /var/www/media:/opt/project/media
- /var/www/static:/opt/project/static