-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
159 lines (152 loc) · 4.85 KB
/
docker-compose.yml
File metadata and controls
159 lines (152 loc) · 4.85 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
services:
redis:
image: redis:7-alpine
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: .
dockerfile: Dockerfile.web
image: webkinpred-web:latest
ports:
- "8000:8000"
volumes:
- ./media:/app/media
- ./db.sqlite3:/app/db.sqlite3
- ./manage.py:/app/manage.py
- ./api:/app/api
- ./models:/app/models:ro
- ./db_models:/app/db_models
- ./webKinPred:/app/webKinPred
- ./fastas:/app/fastas
- ./tools:/app/tools
- ./staticfiles:/app/staticfiles
environment:
- PYTHONPATH=/app
- DEBUG=1
- DJANGO_SETTINGS_MODULE=webKinPred.settings_docker
- DJANGO_SECRET_KEY=${DJANGO_SECRET_KEY:?DJANGO_SECRET_KEY must be set}
- REDIS_URL=redis://redis:6379/0
- MMSEQS_TMP_DIR=/app/mmseqs_tmp
- GPU_EMBED_SERVICE_URL=${GPU_EMBED_SERVICE_URL:-}
- GPU_EMBED_SERVICE_TOKEN=${GPU_EMBED_SERVICE_TOKEN:-}
- GPU_EMBED_HEALTH_TTL_SECONDS=${GPU_EMBED_HEALTH_TTL_SECONDS:-10}
- GPU_EMBED_JOB_TIMEOUT_SECONDS=${GPU_EMBED_JOB_TIMEOUT_SECONDS:-1200}
- GPU_EMBED_FAIL_CLOSED=${GPU_EMBED_FAIL_CLOSED:-0}
command: gunicorn webKinPred.wsgi:application --bind 0.0.0.0:8000 --workers 2 --timeout 120
depends_on:
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/health/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "5173:5173"
volumes:
- ./frontend:/app
- frontend_node_modules:/app/node_modules
environment:
- VITE_API_BASE_URL=http://localhost:8000/api
- NODE_ENV=development
- DOCKER=true
depends_on:
backend:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:5173"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
celery:
build:
context: .
dockerfile: Dockerfile
args:
WEBKINPRED_ENVS_IMAGE: ${WEBKINPRED_ENVS_IMAGE:-webkinpred-envs:latest}
image: webkinpred-worker:latest
volumes:
- ./media:/app/media
- ./db.sqlite3:/app/db.sqlite3
- ./manage.py:/app/manage.py
- ./api:/app/api
- ./models:/app/models:ro
- ./db_models:/app/db_models
- ./webKinPred:/app/webKinPred
- ./fastas:/app/fastas
- ./tools:/app/tools
- ./staticfiles:/app/staticfiles
environment:
- PYTHONPATH=/app
- DEBUG=1
- DJANGO_SETTINGS_MODULE=webKinPred.settings_docker
- DJANGO_SECRET_KEY=${DJANGO_SECRET_KEY:?DJANGO_SECRET_KEY must be set}
- REDIS_URL=redis://redis:6379/0
- GPU_EMBED_SERVICE_URL=${GPU_EMBED_SERVICE_URL:-}
- GPU_EMBED_SERVICE_TOKEN=${GPU_EMBED_SERVICE_TOKEN:-}
- GPU_EMBED_HEALTH_TTL_SECONDS=${GPU_EMBED_HEALTH_TTL_SECONDS:-10}
- GPU_EMBED_JOB_TIMEOUT_SECONDS=${GPU_EMBED_JOB_TIMEOUT_SECONDS:-1200}
- GPU_EMBED_FAIL_CLOSED=${GPU_EMBED_FAIL_CLOSED:-0}
depends_on:
redis:
condition: service_healthy
backend:
condition: service_healthy
command: celery -A webKinPred worker --loglevel=info --queues=webkinpred --concurrency=1
healthcheck:
test: ["CMD", "celery", "-A", "webKinPred", "inspect", "ping"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
security_opt:
- apparmor:unconfined
celery-beat:
image: webkinpred-web:latest
volumes:
- ./media:/app/media
- ./db.sqlite3:/app/db.sqlite3
- ./manage.py:/app/manage.py
- ./api:/app/api
- ./models:/app/models:ro
- ./db_models:/app/db_models
- ./webKinPred:/app/webKinPred
- ./fastas:/app/fastas
- ./tools:/app/tools
- ./staticfiles:/app/staticfiles
environment:
- PYTHONPATH=/app
- DEBUG=1
- DJANGO_SETTINGS_MODULE=webKinPred.settings_docker
- DJANGO_SECRET_KEY=${DJANGO_SECRET_KEY:?DJANGO_SECRET_KEY must be set}
- REDIS_URL=redis://redis:6379/0
- GPU_EMBED_SERVICE_URL=${GPU_EMBED_SERVICE_URL:-}
- GPU_EMBED_SERVICE_TOKEN=${GPU_EMBED_SERVICE_TOKEN:-}
- GPU_EMBED_HEALTH_TTL_SECONDS=${GPU_EMBED_HEALTH_TTL_SECONDS:-10}
- GPU_EMBED_JOB_TIMEOUT_SECONDS=${GPU_EMBED_JOB_TIMEOUT_SECONDS:-1200}
- GPU_EMBED_FAIL_CLOSED=${GPU_EMBED_FAIL_CLOSED:-0}
depends_on:
redis:
condition: service_healthy
backend:
condition: service_healthy
command: celery -A webKinPred beat --loglevel=info
healthcheck:
test: ["CMD", "pgrep", "-f", "celery.*beat"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
volumes:
frontend_node_modules: