-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
34 lines (32 loc) · 790 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
34 lines (32 loc) · 790 Bytes
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
services:
backend:
build:
context: .
dockerfile: Dockerfile.backend
env_file:
- .env
ports:
- "8000:8000"
volumes:
# Cache downloaded sentence-transformers/HF models so they aren't
# re-downloaded every time you rebuild the image.
- hf_cache:/root/.cache/huggingface
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/')"]
interval: 10s
timeout: 5s
retries: 5
start_period: 180s
frontend:
build:
context: .
dockerfile: Dockerfile.frontend
environment:
- BACKEND_URL=http://backend:8000
ports:
- "8501:8501"
depends_on:
backend:
condition: service_healthy
volumes:
hf_cache: