-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (55 loc) · 1.83 KB
/
Copy pathdocker-compose.yml
File metadata and controls
57 lines (55 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
53
54
55
56
57
services:
db:
image: pgvector/pgvector:pg16
ports:
- "5432:5432"
environment:
POSTGRES_USER: ${POSTGRES_USER:-rag}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-rag}
POSTGRES_DB: ${POSTGRES_DB:-rag}
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test:
- CMD-SHELL
- pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"
interval: 5s
timeout: 3s
retries: 12
start_period: 5s
restart: unless-stopped
app:
build:
context: .
dockerfile: Dockerfile
env_file:
- .env
environment:
# Override the .env DATABASE_URL host so the app talks to the
# `db` service inside the compose network, regardless of what
# the developer put in .env (which may point at localhost for
# host-side tooling).
DATABASE_URL: postgresql://${POSTGRES_USER:-rag}:${POSTGRES_PASSWORD:-rag}@db:5432/${POSTGRES_DB:-rag}
ports:
- "8000:8000"
# Linux: make host.docker.internal resolve to the host so the
# local OpenAI-API-compatible grounding judge (LM Studio / Ollama /
# llama.cpp) is reachable from inside the container, matching the
# macOS/Windows behavior of Docker Desktop. Feature 002 / FR-028.
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
# Mount data/ so `make ingest` (which dispatches inside the
# container) can reach the committed sample PDF + any PDFs the
# developer drops in, and write ingested PDFs for serving.
- ./data:/app/data
# Mount evals/ read-write so `make eval` can read the committed
# question set AND write fresh results.{jsonl,md} that we then
# commit. Feature 005 / Article III.
- ./evals:/app/evals
depends_on:
db:
condition: service_healthy
restart: unless-stopped
volumes:
pgdata: