-
-
Notifications
You must be signed in to change notification settings - Fork 69
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
125 lines (117 loc) · 2.91 KB
/
Copy pathdocker-compose.yml
File metadata and controls
125 lines (117 loc) · 2.91 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: purldb
services:
db:
image: docker.io/library/postgres:17.10
env_file:
- docker.env
volumes:
- db_data:/var/lib/postgresql/data/
shm_size: "1gb"
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: docker.io/library/redis:8.8.0-alpine
# Enable redis data persistence using the "Append Only File" with the
# default policy of fsync every second. See https://redis.io/topics/persistence
command: redis-server --appendonly yes --loglevel warning
volumes:
- redis_data:/data
restart: always
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
web:
build: .
command: sh -c "
python manage.py migrate &&
python manage.py collectstatic --no-input --verbosity 0 --clear &&
gunicorn purldb.wsgi:application --bind :8000 --timeout 600 \
--workers ${GUNICORN_WORKERS:-8} --worker-tmp-dir /dev/shm"
env_file:
- docker.env
expose:
- 8000
volumes:
- .env:/opt/purldb/.env
- /etc/purldb/:/etc/purldb/
- temp_data:/tmp/minecode/
- static:/var/purldb/static/
- workspace:/var/purldb/workspace/
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
priority_queue:
build: .
command: python manage.py priority_queue
env_file:
- docker.env
volumes:
- .env:/opt/purldb/.env
- /etc/purldb/:/etc/purldb/
profiles:
- priority_queue
depends_on:
db:
condition: service_healthy
web:
condition: service_started
scheduler:
build: .
command: python manage.py run_scheduler
env_file:
- docker.env
volumes:
- .env:/opt/purldb/.env
- /etc/purldb/:/etc/purldb/
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
web:
condition: service_started
rq_worker:
build: .
command: python manage.py rqworker default
env_file:
- docker.env
volumes:
- .env:/opt/purldb/.env
- /etc/purldb/:/etc/purldb/
- temp_data:/tmp/minecode/
- workspace:/var/purldb/workspace/
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
web:
condition: service_started
nginx:
image: docker.io/library/nginx:1.31.2-alpine
ports:
- "${NGINX_PUBLISHED_HTTP_PORT:-80}:80"
- "${NGINX_PUBLISHED_HTTPS_PORT:-443}:443"
volumes:
- ./etc/nginx/conf.d/:/etc/nginx/conf.d/
- webroot:/var/www/html/
- static:/var/purldb/static/
depends_on:
web:
condition: service_started
restart: always
volumes:
db_data:
redis_data:
static:
temp_data:
workspace:
webroot: