-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.dev.yml
62 lines (62 loc) · 1.59 KB
/
docker-compose.dev.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
56
57
58
59
60
61
62
services:
db:
image: mysql:8.0
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: example
MYSQL_DATABASE: mydatabase
MYSQL_USER: user
MYSQL_PASSWORD: password
container_name: db
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
image: meminseeker/turquiz:backend
platform: linux/amd64
ports:
- "8000:8000"
container_name: backend
command: >
sh -c "
./wait-for-it.sh db:3306 --
python manage.py makemigrations &&
python manage.py migrate &&
python manage.py runserver 0.0.0.0:8000"
env_file: ./.env.dev
depends_on:
db:
condition: service_healthy
client:
build:
context: ./client
image: meminseeker/turquiz:client
platform: linux/amd64
ports:
- "3310:3310"
container_name: client
command: >
sh -c "serve -s dist -l 3310"
env_file: ./.env.dev
depends_on:
- backend
nginx:
build:
context: ./nginx
image: meminseeker/turquiz:nginx
platform: linux/amd64
restart: always
ports:
- "80:80"
depends_on:
- client
volumes:
db_data: