-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathdocker-compose.yml
34 lines (34 loc) · 1004 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
#docker-compose.yml
version: "3.5"
services:
# define your DB service - mysql
db:
image: mysql
environment:
# required mysql config, should be in sync with django settings
- MYSQL_ROOT_PASSWORD=pass
- MYSQL_DATABASE=codexpose
- MYSQL_USER=dev
- MYSQL_PASSWORD=abc@1234
networks:
- main # Add the container to the network "main"
web:
# point build to current dir, so that it can pick Dockerfile for web image
build: .
# Added sleep to make sure MySql service is ready - FIXME
command: >
bash -c "sleep 20
&& python backend/codexpose/manage.py makemigrations interview
&& python backend/codexpose/manage.py migrate
&& python backend/codexpose/manage.py createsuperuser
&& python backend/codexpose/manage.py runserver 0.0.0.0:8000"
volumes:
- .:/code
ports:
- "8000:8000"
networks:
- main # Add the container to the network "main"
depends_on:
- db
networks:
main: