generated from aboutcode-org/skeleton
-
Notifications
You must be signed in to change notification settings - Fork 23
/
docker-compose.common.yml
81 lines (75 loc) · 1.74 KB
/
docker-compose.common.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
services:
db:
image: postgres:13
env_file:
- docker_purldb.env
volumes:
- db_data:/var/lib/postgresql/data/
shm_size: "1gb"
restart: always
redis:
image: redis
command: redis-server --appendonly yes
volumes:
- redis_data:/data
restart: always
web:
build: .
command: wait-for-it --strict --timeout=60 db:5432 -- sh -c "
python manage_purldb.py migrate &&
python manage_purldb.py collectstatic --no-input --verbosity 0 --clear &&
gunicorn purldb_project.wsgi:application --bind :8000 --timeout 600 --workers 8"
env_file:
- docker_purldb.env
expose:
- 8000
volumes:
- .env:/opt/purldb/.env
- /etc/purldb/:/etc/purldb/
- temp_data:/tmp/minecode/
- static:/var/purldb/static/
depends_on:
- db
priority_queue:
build: .
command: wait-for-it web:8000 -- python manage_purldb.py priority_queue
env_file:
- docker_purldb.env
volumes:
- .env:/opt/purldb/.env
- /etc/purldb/:/etc/purldb/
profiles:
- priority_queue
depends_on:
- db
- web
scheduler:
build: .
command: wait-for-it web:8000 -- python manage_purldb.py run_scheduler
env_file:
- docker_purldb.env
volumes:
- .env:/opt/purldb/.env
- /etc/purldb/:/etc/purldb/
depends_on:
- redis
- db
- web
rq_worker:
build: .
command: wait-for-it web:8000 -- python manage_purldb.py rqworker default
env_file:
- docker_purldb.env
volumes:
- .env:/opt/purldb/.env
- /etc/purldb/:/etc/purldb/
- temp_data:/tmp/minecode/
depends_on:
- redis
- db
- web
volumes:
db_data:
static:
redis_data:
temp_data: