-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
38 lines (32 loc) · 1.3 KB
/
Copy pathdocker-compose.yml
File metadata and controls
38 lines (32 loc) · 1.3 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
# Example deployment of the generic mcp-gateway image.
#
# Put a policy.yaml (start from policy.example.minimal.yaml) in ./config, then
# `docker compose up -d`. Backends that bake in specific MCP servers should
# instead build a thin overlay `FROM ghcr.io/nick-pape/mcp-gateway` and add them.
name: mcp-gateway
services:
mcp-gateway:
image: ghcr.io/nick-pape/mcp-gateway:latest
container_name: mcp-gateway
restart: unless-stopped
# Caddy/your reverse proxy should front 8443 (TLS + routing).
ports:
- "8443:8443"
# Capability minimization: drop all, re-add only what's needed to spawn
# per-identity stdio children at distinct UIDs and chown their token files.
cap_drop: [ALL]
cap_add: [SETUID, SETGID, CHOWN]
# Per-identity secret files live on a tmpfs (RAM-only, gone on stop).
tmpfs:
- /run/mcp-tokens:size=16m,mode=0711
# Config dir: policy.yaml (+ secrets.yaml for the `file` backend, + the
# rotated fanout_jwt if you use the bao backend's refresher). Mount the
# DIRECTORY (not single files) so atomic refresher writes work.
volumes:
- ./config:/etc/mcp-gateway
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://127.0.0.1:8443/health || exit 1"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s