-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
55 lines (53 loc) · 1.34 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
version: '3'
services:
db:
image: mysql:5.7
restart: always
environment:
MYSQL_DATABASE: sample
MYSQL_ROOT_PASSWORD: password
ports:
- "3306:3306"
volumes:
- mysql-db:/var/lib/mysql
- ./config/nginx/my.cnf:/etc/mysql/conf.d/my.cnf
command: mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci
django:
build:
context: ./backend
command: ./wait-for-it.sh db:3306 -- pipenv run ./sample/manage.py runserver 0.0.0.0:8000
environment:
- DJANGO_SECRET_KEY=secret_key
- DATABASE_URL=mysql://root:password@db:3306/sample
expose:
- "8000"
ports:
- "8000:8000"
volumes:
- ./backend:/app
depends_on:
- db
nuxt:
build:
context: ./frontend
command: bash -c "yarn run dev"
volumes:
- ./frontend:/app
expose:
- "3000"
ports:
- "3000:3000"
depends_on:
- django
nginx:
image: nginx:latest
ports:
- "80:80"
volumes:
- ./config/nginx:/etc/nginx/conf.d
depends_on:
- django
- nuxt
volumes:
mysql-db:
driver: local