Files
Hermes Agent 345a9c12c6
CI / Build on Node 18 (push) Canceled after 0s
CI / Build on Node 20 (push) Canceled after 0s
CI / Build on Node 22 (push) Canceled after 0s
CI / Docker image builds (push) Canceled after 0s
Add Surfshark WireGuard tunnel and public Streamable HTTP endpoint
mcp-maigret speaks stdio only, so it had no way to be deployed behind a VPN
with a domain. This wraps it in Gluetun (Surfshark, WireGuard) and publishes
it over HTTPS via supergateway.

- docker-compose.yml: gluetun sidecar + maigret-mcp in its network namespace,
  so all maigret egress leaves through the tunnel. No ports, no networks on
  the app; domain attaches to gluetun:8000 because the app has no IP of its own.
- Dockerfile: bake supergateway@4.2.2 into the image so a restart never depends
  on the npm registry.
- entrypoint is overridden rather than command, because the image's ENTRYPOINT
  is ["node","build/index.js"] and command only replaces CMD.
- MAIGRET_RUNNER=local is required: the docker runner would spawn a sibling
  container outside the namespace and defeat the VPN.
- Public endpoint requires a bearer token (supergateway --apiKey), healthcheck
  is a real MCP-aware probe, not a port check.
- DEPLOY.md documents deployment, routing, and verification.
2026-11-21 10:15:28 +00:00

31 lines
1.6 KiB
Bash

# ---------------------------------------------------------------------------
# mcp-maigret + Surfshark WireGuard — the values you supply
#
# Copy to `.env` for a local `docker compose up`. `.env` is gitignored upstream.
# On Coolify these live under Configuration > Environment Variables instead.
# ---------------------------------------------------------------------------
# --- Surfshark WireGuard keypair -------------------------------------------
# Surfshark account > VPN > Manual setup > Desktop or mobile > WireGuard >
# "I don't have a keypair" > name it > Generate a new keypair.
# Then download any location's config file:
# Private key -> WIREGUARD_PRIVATE_KEY (32-byte base64, ends with "=")
# Address line -> WIREGUARD_ADDRESSES (IPv4 part only, e.g. 10.14.0.2/16)
# The Address value is identical for every Surfshark server with that keypair,
# so you only look it up once. Ignore everything else in the config file.
WIREGUARD_PRIVATE_KEY=
WIREGUARD_ADDRESSES=
# --- Public endpoint API key ----------------------------------------------
# supergateway rejects requests without it (HTTP 401).
# On Coolify this is generated for you: the compose references
# ${SERVICE_PASSWORD_64_MCPAPIKEY}, so Coolify creates and stores a 64-char
# value you can read and rotate under Environment Variables.
# For a local run, put any strong value here:
SERVICE_PASSWORD_64_MCPAPIKEY=
# --- Optional --------------------------------------------------------------
# Valid values come from Gluetun's server list (100 countries for Surfshark).
SERVER_COUNTRIES=Austria
TZ=Europe/Vienna