# ------------------------------------------------------------------
# Portainer MCP — container deployment (HTTP, per-user passthrough).
#
# .env is the single source of truth: Compose interpolates MCP_HOST_PORT
# from it, and env_file injects every PORTAINER_* value into the container.
# Committed so Portainer (Git + relative path volumes) auto-loads it.
# ------------------------------------------------------------------

# Host port published for the VPS Caddy edge (forwarded over WireGuard).
MCP_HOST_PORT=17717

# Upstream Portainer 2.45.1 server API. Let's Encrypt cert via the VPS Caddy
# edge, so TLS verification stays on. Alternative internal route:
# http://docker.local:9000 (requires the name to resolve inside the container).
PORTAINER_URL=https://portainer.mildgrim.com

# Shared front-gate secret for this MCP server. Generate ONCE with:
#   openssl rand -hex 32
# Every MCP client sends it as: Authorization: Bearer <token>
PORTAINER_MCP_AUTH_TOKEN=cd0b1fbb67fc87a0627abc5a9fcd95d85bd0270c23295d052671508563cc5402

# DNS-rebinding allowlist: the hostname clients actually use (bare — 443).
PORTAINER_MCP_ALLOWED_HOSTS=mcp-portainer.mildgrim.com

# TLS posture: attest that the VPS Caddy edge terminates TLS.
PORTAINER_MCP_TRUST_PROXY_TLS=1

# Only trust X-Forwarded-* headers from the VPS reverse proxy.
# Must be the source IP the container actually sees as the socket peer.
# If Docker's userland proxy rewrites it to the bridge gateway, change this
# to that gateway/CIDR (e.g. 172.17.0.0/16) after checking the audit log.
PORTAINER_MCP_FORWARDED_ALLOW_IPS=192.168.1.1/32

# No Kubernetes in this infra — drop the K8s tools.
PORTAINER_PROFILES=BASE,DOCKER,GITOPS
