-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
52 lines (48 loc) · 965 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
services:
db:
image: mysql:8.0.39
container_name: mysql_db
restart: always
environment:
MYSQL_ROOT_PASSWORD: mypassword
MYSQL_DATABASE: beatscape
MYSQL_USER: myuser
MYSQL_PASSWORD: mypassword
volumes:
- ./backend/mysql-init/init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "3306:3306"
networks:
- db
adminer:
image: adminer
restart: always
container_name: adminer
ports:
- "8080:8080"
networks:
- db
web:
build:
context: ./backend
dockerfile: Dockerfile
restart: always
container_name: django_web
depends_on:
- db
ports:
- "8000:8000"
networks:
- db
volumes:
- ./backend/beatscape:/app
command: >
sh -c "
sleep 10 &&
python manage.py migrate &&
gunicorn --bind 0.0.0.0:8000 beatscape.wsgi:application
"
volumes:
mysql_data:
networks:
db: