-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathdocker-compose.dev.yml
72 lines (63 loc) · 1.51 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
63
64
65
66
67
68
69
70
71
72
version: '3'
services:
db:
image: postgres:12
env_file:
.env
volumes:
- postgres_data:/var/lib/postgresql/data/
redis:
image: redis
backend:
build: .
deploy:
restart_policy:
condition: on-failure
max_attempts: 3
command: >-
bash -c "python manage.py makemigrations --settings=judge.dev_settings &&
python manage.py makemigrations interface --settings=judge.dev_settings &&
python manage.py migrate --noinput --settings=judge.dev_settings &&
python manage.py migrate --noinput interface --settings=judge.dev_settings &&
python manage.py collectstatic --no-input --settings=judge.dev_settings &&
python manage.py loaddata /backend/language_model.json --settings=judge.dev_settings &&
python manage.py runserver 0.0.0.0:8000 --settings=judge.dev_settings"
volumes:
- app:/backend:rw
- static:/backend/static/
- media:/backend/media/
env_file:
- .env
ports:
- "8000:8000"
depends_on:
- db
- redis
rabbitmq:
image: rabbitmq:3.8-management
ports:
- "5672:5672"
- "15672:15672"
env_file:
.env
frontend:
build: ./frontend
command: yarn run dev
env_file:
./frontend/.env
ports:
- "3000:3000"
nginx:
build: ./nginx
volumes:
- ./static:/backend/static/
- ./media:/backend/media/
ports:
- "80:80"
depends_on:
- backend
volumes:
postgres_data:
app:
static:
media: