-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
77 lines (74 loc) · 2.75 KB
/
Copy pathdocker-compose.yml
File metadata and controls
77 lines (74 loc) · 2.75 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
67
68
69
70
71
72
73
74
75
76
77
services:
db:
image: pgvector/pgvector:pg16
environment:
POSTGRES_USER: reqsolve
POSTGRES_PASSWORD: reqsolve
POSTGRES_DB: reqsolve
ports:
- '5432:5432'
volumes:
- trove_db:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U reqsolve -d reqsolve']
interval: 5s
timeout: 5s
retries: 10
# Local embeddings model (BGE-M3) for knowledge-base search. CPU-only.
# Serves, then pulls the model on first boot; the model is cached in a volume.
ollama:
image: ollama/ollama:latest
entrypoint: ['/bin/sh']
command:
- '-c'
- '/bin/ollama serve & until /bin/ollama list >/dev/null 2>&1; do sleep 1; done; /bin/ollama pull bge-m3; wait'
volumes:
- ollama_models:/root/.ollama
ports:
- '11434:11434'
healthcheck:
# Healthy only once the model has been pulled.
test: ['CMD-SHELL', '/bin/ollama list | grep -q bge-m3 || exit 1']
interval: 10s
timeout: 5s
retries: 90
app:
build: .
depends_on:
db:
condition: service_healthy
ollama:
# Wait until BGE-M3 is pulled so embeddings are consistent from the start.
condition: service_healthy
environment:
DATABASE_URL: postgres://reqsolve:reqsolve@db:5432/reqsolve
APP_URL: http://localhost:3000
NODE_ENV: production
# Provide your Anthropic key here (or in a .env file, or in Admin · AI settings).
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-}
AI_MODEL_FAST: ${AI_MODEL_FAST:-claude-haiku-4-5-20251001}
AI_MODEL_SMART: ${AI_MODEL_SMART:-claude-haiku-4-5-20251001}
# Embeddings come from the bundled Ollama (BGE-M3) — the only provider.
OLLAMA_BASE_URL: ${OLLAMA_BASE_URL:-http://ollama:11434}
OLLAMA_EMBED_MODEL: ${OLLAMA_EMBED_MODEL:-bge-m3}
# Email channel. Mailboxes are connected in Admin · Email; these are the
# server-level knobs. EMAIL_POLL_SECONDS auto-fetches inbound mail (0 = off,
# use "Sync now"). GOOGLE_* are only needed for one-click "Connect Gmail".
EMAIL_POLL_SECONDS: ${EMAIL_POLL_SECONDS:-60}
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID:-}
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET:-}
# Encrypts mail passwords / OAuth tokens at rest. openssl rand -base64 32
ENCRYPTION_KEY: ${ENCRYPTION_KEY:-}
# Where uploaded attachments are stored (persisted in the trove_uploads volume).
UPLOADS_DIR: /data/uploads
volumes:
- trove_uploads:/data/uploads
ports:
- '3000:3000'
# Migrate on boot, then start the server. Starts clean — no demo data;
# the first visit creates the admin account.
command: sh -c "npm run db:migrate && npm run start"
volumes:
trove_db:
ollama_models:
trove_uploads: