-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.allinone.yml
More file actions
68 lines (66 loc) · 3.33 KB
/
Copy pathdocker-compose.allinone.yml
File metadata and controls
68 lines (66 loc) · 3.33 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
# All-in-one deployment: OSS proton + tpk (chat agent + web UI + toolkit) in a
# single container — fully open-source, runs the agent with TPK_DB_BACKEND=proton
# (baked into the image). Good for tests, demos, and quick local runs — one
# command, no inter-container networking. For a production-shaped deployment
# (separate DB and App containers, Enterprise timeplusd), use the default file
# instead: `docker compose up -d`.
#
# cp .env.example .env # put your API keys + GITHUB_TOKEN there
# docker compose -f docker-compose.allinone.yml up -d
# docker compose -f docker-compose.allinone.yml exec tpk tpk ingest
# docker compose -f docker-compose.allinone.yml exec tpk tpk status
# open http://localhost:8000 # chat agent + web UI
#
# Variables are the same as the DB + App file (see docker-compose.yml).
services:
tpk:
build:
context: .
dockerfile: deploy/docker/Dockerfile
target: allinone
image: timeplus/tpk:dev
container_name: tpk
ports:
- "8000:8000" # chat agent + web UI
- "8123:8123" # SQL over HTTP (ClickHouse-compatible)
volumes:
# Distinct volume from the DB+App file's `tpk-data` (timeplusd). proton
# and timeplusd data dirs are NOT interchangeable -- proton can't load a
# metastore written by Enterprise timeplusd (bootstrap fails,
# CANNOT_LOAD_CONFIG), so the two deployments must not share a data
# volume. Same compose project name would otherwise collide on `tpk-data`.
- tpk-proton-data:/var/lib/proton
# Distinct checkout cache from the DB+App file's `tpk-checkouts`. This
# container runs as UID 101 (proton), while the DB+App `app` container
# runs as root -- a shared cache leaves git checkouts owned by one user
# that the other can't operate on ("git ... detected dubious ownership").
# Same compose project name would otherwise collide on `tpk-checkouts`.
- tpk-proton-checkouts:/opt/tpk/.checkouts
environment:
# TIMEPLUS_HOST defaults to localhost and TPK_DB_BACKEND=proton is baked
# into the image (serve talks to the proton running in this container).
TIMEPLUS_PASSWORD: ${TIMEPLUS_PASSWORD:?TIMEPLUS_PASSWORD must be set in .env}
TIMEPLUS_USER: tpk
TPK_AGENT_PROVIDER: ${TPK_AGENT_PROVIDER:-}
TPK_AGENT_MODEL: ${TPK_AGENT_MODEL:-}
TPK_AGENT_REASONING_EFFORT: ${TPK_AGENT_REASONING_EFFORT:-}
TPK_CHAT_AUDIT: ${TPK_CHAT_AUDIT:-}
# Global fallback daily token budget for non-admin chat (0 = unlimited);
# a role's own daily_token_limit (Users -> Roles) overrides it.
TPK_DAILY_TOKEN_LIMIT: ${TPK_DAILY_TOKEN_LIMIT:-}
# Semantic-extraction (graphify) backend. `auto` is ambiguous when both
# API keys are set (picks claude), so set this to openai|claude to choose.
# The model comes from OPENAI_MODEL / ANTHROPIC_MODEL (graphify reads them).
TPK_EXTRACTION_BACKEND: ${TPK_EXTRACTION_BACKEND:-}
TPK_EXTRACTION_MODEL: ${TPK_EXTRACTION_MODEL:-}
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-}
ANTHROPIC_BASE_URL: ${ANTHROPIC_BASE_URL:-}
ANTHROPIC_MODEL: ${ANTHROPIC_MODEL:-}
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
OPENAI_BASE_URL: ${OPENAI_BASE_URL:-}
OPENAI_MODEL: ${OPENAI_MODEL:-}
GITHUB_TOKEN: ${GITHUB_TOKEN:-}
restart: unless-stopped
volumes:
tpk-proton-data:
tpk-proton-checkouts: