-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
66 lines (63 loc) · 2 KB
/
docker-compose.yml
File metadata and controls
66 lines (63 loc) · 2 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
services:
# ── SQLite mode (default — no external dependencies) ─────────────────────────
app:
build: .
ports:
- "${PORT:-8000}:8000"
volumes:
- ce_data:/data
environment:
DATABASE_URL: sqlite+aiosqlite:////data/context.db
DATA_DIR: /data
LITELLM_API_KEY: ${LITELLM_API_KEY:-}
EXTRACTION_MODEL: ${EXTRACTION_MODEL:-}
EMBEDDING_MODEL: ${EMBEDDING_MODEL:-}
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
volumes:
ce_data:
# ──────────────────────────────────────────────────────────────────────────────
# POSTGRES VARIANT
# To run with PostgreSQL instead of SQLite, comment out the `app` service
# above and uncomment the two services below:
#
# services:
# db:
# image: postgres:16-alpine
# environment:
# POSTGRES_DB: context_engine
# POSTGRES_USER: ce
# POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
# volumes:
# - pg_data:/var/lib/postgresql/data
# restart: unless-stopped
# healthcheck:
# test: ["CMD-SHELL", "pg_isready -U ce -d context_engine"]
# interval: 10s
# retries: 5
#
# app:
# build: .
# ports:
# - "${PORT:-8000}:8000"
# depends_on:
# db:
# condition: service_healthy
# environment:
# DATABASE_URL: postgresql://ce:${POSTGRES_PASSWORD:-changeme}@db:5432/context_engine
# DATA_DIR: /data
# LITELLM_API_KEY: ${LITELLM_API_KEY:-}
# EXTRACTION_MODEL: ${EXTRACTION_MODEL:-}
# EMBEDDING_MODEL: ${EMBEDDING_MODEL:-}
# volumes:
# - ce_uploads:/data
# restart: unless-stopped
#
# volumes:
# pg_data:
# ce_uploads: