-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
92 lines (88 loc) · 2.97 KB
/
docker-compose.yml
File metadata and controls
92 lines (88 loc) · 2.97 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
services:
# ── Main web app (FastAPI dashboard + API) ──────────────────────────────
app:
build: .
image: mcp-forge-app
container_name: mcp_forge_app
restart: unless-stopped
ports:
- "${PORT:-8000}:8000"
volumes:
- .:/app # live reload in dev
- mcp_forge_data:/app/data
- mcp_forge_logs:/app/logs
- ./generated:/app/generated # bind-mount so files appear on host
- ./mnt:/mnt:ro # drop project folders into mnt/ to use them
- ./cache/huggingface:/root/.cache/huggingface # persist model downloads (visible in File Explorer)
environment:
- DB_URL=sqlite+aiosqlite:///./data/mcp_forge.db
command: >
uvicorn main:app
--host 0.0.0.0
--port 8000
--reload
depends_on:
- redis
# Allows containers to reach the Docker host (needed for LOCAL_MODEL_HOST proxy on Linux).
# On macOS / Windows Docker Desktop this is automatic; on Linux it requires host-gateway.
extra_hosts:
- "host.docker.internal:host-gateway"
# ── GPU (NVIDIA) — uncomment if on Linux with NVIDIA GPU ────────────────
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: all
# capabilities: [gpu]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
# ── MCP Server (exposed to Claude Desktop) ──────────────────────────────
mcp:
build: .
image: mcp-forge-mcp
container_name: mcp_forge_mcp
restart: unless-stopped
ports:
- "${MCP_SERVER_PORT:-8001}:8001"
volumes:
- .:/app
- mcp_forge_data:/app/data
environment:
- APP_URL=http://app:8000
- MCP_TRANSPORT=sse
- MCP_SERVER_PORT=8001
command: python mcp_server/server.py
depends_on:
- app
# ── Redis (pub/sub for real-time dashboard updates) ──────────────────────
redis:
image: redis:7-alpine
container_name: mcp_forge_redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- mcp_forge_redis:/data
command: redis-server --appendonly yes
# ── PostgreSQL (uncomment for production) ───────────────────────────────
# db:
# image: postgres:16-alpine
# container_name: mcp_forge_db
# restart: unless-stopped
# ports:
# - "5432:5432"
# environment:
# POSTGRES_USER: mcp_forge
# POSTGRES_PASSWORD: ${DB_PASSWORD:-mcp_forge_secret}
# POSTGRES_DB: mcp_forge
# volumes:
# - mcp_forge_postgres:/var/lib/postgresql/data
volumes:
mcp_forge_data:
mcp_forge_logs:
mcp_forge_redis:
# mcp_forge_postgres: