-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (50 loc) · 1.83 KB
/
Copy pathdocker-compose.yml
File metadata and controls
52 lines (50 loc) · 1.83 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
services:
app:
build: .
ports:
- "8000:8000"
env_file:
- .env
environment:
- QDRANT_HOST=qdrant
# QDRANT_API_KEY comes from env_file (.env) — do not redefine it here.
# A `${QDRANT_API_KEY:-}` override would clobber the .env value with an
# empty string whenever the interpolation context lacks the var, which
# silently desyncs the app from the (authenticated) Qdrant server.
# Force HuggingFace's classic CDN download path. The Xet transfer
# protocol is blocked/throttled by some corporate TLS-inspection proxies.
- HF_HUB_DISABLE_XET=1
volumes:
- ./docs:/app/docs
# Real (confidential) corpus — gitignored on the host. Read-only mount so
# the container can ingest it when INGEST_ROOT=data.
- ./data:/app/data:ro
# Self-contained model cache so `docker compose up` works on any host
# regardless of UID. First run downloads the models (~90MB); persists after.
- hf_cache:/home/appuser/.cache/huggingface
depends_on:
qdrant:
condition: service_healthy
restart: unless-stopped
qdrant:
image: qdrant/qdrant:latest
# No 'ports' — Qdrant stays on the internal docker network only. Expose
# the ports for cross-container traffic without publishing to the host.
expose:
- "6333"
- "6334"
environment:
# Fail loudly if QDRANT_API_KEY is unset/empty rather than starting an
# unauthenticated server that the app expects to be authenticated.
- QDRANT__SERVICE__API_KEY=${QDRANT_API_KEY:?QDRANT_API_KEY must be set in .env}
volumes:
- qdrant_data:/qdrant/storage
healthcheck:
test: ["CMD-SHELL", "bash -c 'echo > /dev/tcp/localhost/6333'"]
interval: 5s
timeout: 3s
retries: 5
restart: unless-stopped
volumes:
qdrant_data:
hf_cache: