version: '3.8'
services:
# MCP Bridge
mcp-bridge:
build: .
container_name: contextvm-mcp-bridge
restart: unless-stopped
ports:
- "4000:4000"
environment:
- BRIDGE_PRIVATE_KEY=${BRIDGE_PRIVATE_KEY}
- RELAY_URL=${RELAY_URL:-ws://relay:8080}
- RELAY_URL_EXTERNAL=${RELAY_URL_EXTERNAL}
- BRIDGE_PORT=4000
- BRIDGE_HOST=0.0.0.0
- LOG_LEVEL=${LOG_LEVEL:-info}
- MCP_ENCRYPTION_MODE=${MCP_ENCRYPTION_MODE:-OPTIONAL}
- MCP_PUBLIC_ANNOUNCEMENT=${MCP_PUBLIC_ANNOUNCEMENT:-true}
- DVM_RESPONSE_TIMEOUT=${DVM_RESPONSE_TIMEOUT:-30000}
volumes:
- ./config:/app/config:ro
networks:
- contextvm-network
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:4000/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"]
interval: 30s
timeout: 3s
start_period: 10s
retries: 3
# Optional: Nostr Relay (if not using external)
relay:
image: ghcr.io/fiatjaf/khatru:latest
container_name: contextvm-relay
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- relay-data:/data
networks:
- contextvm-network
environment:
- PORT=8080
profiles:
- with-relay
networks:
contextvm-network:
driver: bridge
name: contextvm-network
volumes:
relay-data:
name: contextvm-relay-data