-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
94 lines (91 loc) · 3.16 KB
/
docker-compose.yml
File metadata and controls
94 lines (91 loc) · 3.16 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# ToolsDNS — docker-compose.yml
#
# Starts two services:
# tooldns — REST API on port 8787
# tooldns-mcp — Persistent MCP HTTP server on port 8788
#
# Both share the same ~/.tooldns volume for config, DB, and skills.
#
# Quick start:
# cp .env.example .env # set TOOLDNS_API_KEY
# docker compose up -d
# curl http://localhost:8787/health
#
# Connect your AI agent (Claude Desktop / Cursor / Cline):
# {
# "mcpServers": {
# "tooldns": {
# "type": "streamable-http",
# "url": "http://localhost:8788/mcp",
# "headers": { "Authorization": "Bearer YOUR_API_KEY" }
# }
# }
# }
services:
# ─────────────────────────────────────────────
# REST API — http://localhost:8787
# ─────────────────────────────────────────────
tooldns:
build: .
container_name: tooldns
restart: unless-stopped
ports:
- "8787:8787"
volumes:
# Persist config, database, skills, and logs on the host
- "${TOOLDNS_HOME:-~/.tooldns}:/data"
environment:
TOOLDNS_HOME: /data
TOOLDNS_HOST: 0.0.0.0
TOOLDNS_PORT: 8787
TOOLDNS_API_KEY: ${TOOLDNS_API_KEY:-td_dev_key}
TOOLDNS_PUBLIC_URL: ${TOOLDNS_PUBLIC_URL:-http://localhost:8787}
TOOLDNS_EMBEDDING_MODEL: ${TOOLDNS_EMBEDDING_MODEL:-all-MiniLM-L6-v2}
TOOLDNS_REFRESH_INTERVAL: ${TOOLDNS_REFRESH_INTERVAL:-15}
TOOLDNS_LOG_LEVEL: ${TOOLDNS_LOG_LEVEL:-INFO}
TOOLDNS_WEBHOOK_URL: ${TOOLDNS_WEBHOOK_URL:-}
TOOLDNS_WEBHOOK_SECRET: ${TOOLDNS_WEBHOOK_SECRET:-}
env_file:
- path: .env
required: false
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8787/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
# ─────────────────────────────────────────────
# MCP Server — http://localhost:8788/mcp
# Connect your AI agent to this URL.
# ─────────────────────────────────────────────
tooldns-mcp:
build: .
container_name: tooldns-mcp
restart: unless-stopped
ports:
- "8788:8788"
volumes:
- "${TOOLDNS_HOME:-~/.tooldns}:/data"
environment:
TOOLDNS_HOME: /data
TOOLDNS_API_KEY: ${TOOLDNS_API_KEY:-td_dev_key}
# Point MCP server at the REST API container
TOOLDNS_API_URL: http://tooldns:8787
TOOLDNS_MCP_HOST: 0.0.0.0
TOOLDNS_MCP_PORT: 8788
TOOLDNS_MCP_TRANSPORT: http
TOOLDNS_LOG_LEVEL: ${TOOLDNS_LOG_LEVEL:-INFO}
env_file:
- path: .env
required: false
# MCP server depends on the REST API being healthy first
depends_on:
tooldns:
condition: service_healthy
command: ["python", "-m", "tooldns.mcp_server"]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8788/mcp/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s