-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
84 lines (75 loc) · 1.83 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
version: '2.1'
services:
app:
image: houseofdota:app
build:
context: .
dockerfile: ./containers/Dockerfile
env_file:
- /opt/houseofdota/.env
ports:
- 80:80
redis:
image: redis
ports:
- 6379:6379
build:
context: .
dockerfile: ./containers/Dockerfile.redis
beat:
image: houseofdota:app
command: ["celery", "-A", "houseofdota", "beat", "--logfile", "/var/log/celery/beat.log"]
volumes:
- /var/log/celery/:/var/log/celery/
env_file:
- /opt/houseofdota/.env
links:
- redis
restart: always
worker:
image: houseofdota:app
command: ["celery", "-A", "houseofdota", "worker", "-l", "debug", "--autoscale=5,3", "--logfile", "/var/log/celery/worker.log"]
volumes:
- /opt/houseofdota/files/nn:/usr/src/houseofdota/files/nn/
- /var/log/celery/:/var/log/celery/
env_file:
- /opt/houseofdota/.env
links:
- redis
restart: always
database:
image: database
build:
context: .
dockerfile: ./containers/Dockerfile.postgres
ports:
- 5431:5431
healthcheck:
test: "exit 0"
python_unit_tests:
image: houseofdota:app
command: ["python3", "manage.py", "test"]
environment:
- DJANGO_SETTINGS_MODULE=houseofdota.settings
- DATABASE_NAME=houseofdota
- DATABASE_USER=hoduser_test
- DATABASE_PASSWORD=hod123
- DATABASE_HOST=database
- DATABASE_PORT=5432
links:
- database
depends_on:
database:
condition: service_healthy
js_unit_tests:
image: houseofdota:app
command: ["npm", "run", "test"]
depends_on:
- app
db_migrate:
image: houseofdota:app
command: ["python3", "manage.py", "migrate", "--no-input"]
env_file:
- /opt/houseofdota/.env
depends_on:
- app