You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
91 lines
3.6 KiB
91 lines
3.6 KiB
name: mcp-supergateway |
|
|
|
# NOTE: copy this file to .env and fill in the keys for the servers you enable. |
|
|
|
services: |
|
|
|
# Multi-server MCP gateway (supergateway --config). |
|
# One port, one Streamable HTTP endpoint per server: http://localhost:8000/<name>/mcp |
|
# Servers are defined in supergateway.config.jsonc. |
|
mcp: |
|
build: |
|
context: . |
|
# BUILD_NETWORK=host in .env for hosts where the default docker bridge has |
|
# no egress (see README troubleshooting). Default (bridge) works everywhere |
|
# else; buildx refuses `network: host` builds unless the network.host |
|
# entitlement is granted, which `docker compose build` cannot pass. |
|
network: ${BUILD_NETWORK:-default} |
|
image: chodak166/mcp-supergateway:latest |
|
container_name: mcp-gateway |
|
ports: |
|
- "8000:8000" |
|
env_file: |
|
- .env |
|
volumes: |
|
- ./supergateway.config.jsonc:/etc/supergateway/servers.jsonc:ro |
|
command: |
|
- --config |
|
- /etc/supergateway/servers.jsonc |
|
- --healthEndpoint |
|
- /healthz |
|
restart: unless-stopped |
|
|
|
# open-codebase-index (https://github.com/Helweg/open-codebase-index) |
|
# Serves ONE endpoint per registered project: http://localhost:8001/<slug>/mcp |
|
# Projects are registered with ./add-project.sh (list kept in projects.env, |
|
# gateway config generated into supergateway.projects.jsonc). All projects must |
|
# live under PROJECTS_ROOT (set in .env by add-project.sh), which is mounted at |
|
# its own host path so tool results return paths valid on the host. |
|
# Each project's index data lives in <project>/.opencode/index/. |
|
# The index server process is started per client session; nothing idles. |
|
mcp-codebase-index: |
|
build: |
|
context: . |
|
# BUILD_NETWORK=host in .env for hosts where the default docker bridge has |
|
# no egress (see README troubleshooting). Default (bridge) works everywhere |
|
# else; buildx refuses `network: host` builds unless the network.host |
|
# entitlement is granted, which `docker compose build` cannot pass. |
|
network: ${BUILD_NETWORK:-default} |
|
image: chodak166/mcp-supergateway:latest |
|
container_name: mcp-codebase-index |
|
# Run as the image's `node` user (uid 1000) so index data written into the |
|
# mounted repos is owned by the host user. |
|
user: node |
|
ports: |
|
- "8001:8000" |
|
volumes: |
|
- ${PROJECTS_ROOT:?run ./add-project.sh first}:${PROJECTS_ROOT:?run ./add-project.sh first} |
|
- ./codebase-index.config.json:/etc/codebase-index/config.json:ro |
|
- ./supergateway.projects.jsonc:/etc/supergateway/projects.jsonc:ro |
|
environment: |
|
# Where the ollama embeddings service lives (compose network name). |
|
OLLAMA_HOST: http://ollama:11434 |
|
# Small batches so each embedding request finishes well under the 30s |
|
# client timeout when ollama runs on CPU (defaults intermittently time out). |
|
OLLAMA_MAX_BATCH_TOKENS: 4096 |
|
OLLAMA_MAX_BATCH_ITEMS: 4 |
|
command: |
|
- --config |
|
- /etc/supergateway/projects.jsonc |
|
- --healthEndpoint |
|
- /healthz |
|
restart: unless-stopped |
|
|
|
# Local embeddings for semantic (hybrid) codebase indexing. Dormant by default — |
|
# plain `docker compose up -d` ignores it; it only starts with the embeddings |
|
# profile. Always pass the profile on later `up`/`down` calls that should |
|
# include it (see README "Semantic search"): |
|
# docker compose --profile embeddings up -d |
|
# docker compose exec ollama ollama pull nomic-embed-text |
|
ollama: |
|
image: ollama/ollama:latest |
|
profiles: ["embeddings"] |
|
container_name: mcp-ollama |
|
ports: |
|
- "11434:11434" |
|
volumes: |
|
- ollama:/root/.ollama |
|
restart: unless-stopped |
|
|
|
volumes: |
|
ollama:
|
|
|