-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
40 lines (37 loc) · 1.06 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
version: "3"
services:
backend:
build:
context: ./
dockerfile: ./Dockerfile
command: python manage.py runserver 0.0.0.0:8000
volumes:
- ./:/app/
ports:
- 8000:8000
environment:
DATABASE_ENGINE: "django.db.backends.mysql"
DATABASE_DB: "museum"
DATABASE_USER: "user"
DATABASE_PASSWORD: "password"
DATABASE_HOST: "mysql"
DATABASE_PORT: "3306"
env_file: ./dev.env
depends_on:
- mysql
mysql:
image: mysql:5.7
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: "password"
MYSQL_DATABASE: "museum"
MYSQL_USER: "user"
MYSQL_PASSWORD: "password"
TZ: "Asia/Tokyo"
volumes:
- ./mysql/data:/var/lib/mysql
- ./mysql/initdb.d:/docker-entrypoint-initdb.d
volumes:
mysql: