-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (49 loc) · 1.48 KB
/
Copy pathdocker-compose.yml
File metadata and controls
51 lines (49 loc) · 1.48 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
# Full stack: API + persistent Chroma storage + Streamlit UI (+ one-off seeder).
#
# Chroma runs embedded in the API process (file-based, zero infra — the
# project's fixed storage choice); ./data is bind-mounted so the index survives
# restarts and seeding on the host writes the same index the container serves.
#
# Quickstart (zero manual steps beyond an API key in .env):
# cp .env.example .env # set OPENAI_API_KEY
# docker compose up -d --build # API :8000, UI :8501
# docker compose run --rm seed # index the sample corpus
# open http://localhost:8501 # or curl the API (see README)
services:
api:
build: .
env_file: .env
ports:
- "8000:8000"
volumes:
- ./data:/app/data
healthcheck:
test:
[
"CMD",
"python",
"-c",
"import urllib.request; urllib.request.urlopen('http://localhost:8000/health', timeout=3)",
]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
ui:
build: .
command: streamlit run ui/app.py --server.port 8501 --server.address 0.0.0.0 --server.headless true
environment:
RAG_API_URL: http://api:8000
ports:
- "8501:8501"
depends_on:
api:
condition: service_healthy
# One-off: `docker compose run --rm seed` indexes the sample corpus.
seed:
build: .
profiles: ["seed"]
command: python scripts/seed.py
env_file: .env
volumes:
- ./data:/app/data