diff --git a/apps/ollama-mcp/docker-compose.yml b/apps/ollama-mcp/docker-compose.yml index 85f8a3d..7e8ce4c 100644 --- a/apps/ollama-mcp/docker-compose.yml +++ b/apps/ollama-mcp/docker-compose.yml @@ -51,9 +51,134 @@ services: max-size: "10m" max-file: "3" + # ───────────────────────────────────────────── + # Prometheus / Grafana MCP + # Ask: "Show CPU usage for grafana pod last 1h" + # "Which pods have highest memory?" + # "Alert me if any pod restarts > 5" + # ───────────────────────────────────────────── + mcp-prometheus: + build: ./mcp-prometheus + container_name: ollama-mcp-prometheus + restart: unless-stopped + ports: + - "${MCP_PROMETHEUS_PORT:-3003}:3000" + environment: + - PROMETHEUS_URL=${PROMETHEUS_URL:-http://host.docker.internal:9090} + - GRAFANA_URL=${GRAFANA_URL:-http://host.docker.internal:3000} + - GRAFANA_TOKEN=${GRAFANA_TOKEN:-} + networks: + - mcp-network + extra_hosts: + - "host.docker.internal:host-gateway" + healthcheck: + test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/health"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + logging: + driver: "json-file" + options: + max-size: "10m" + max-file: "3" + + # ───────────────────────────────────────────── + # ArgoCD MCP + # Ask: "Show all out-of-sync apps" + # "Sync the loki application" + # "What changed in the last grafana deploy?" + # ───────────────────────────────────────────── + mcp-argocd: + build: ./mcp-argocd + container_name: ollama-mcp-argocd + restart: unless-stopped + ports: + - "${MCP_ARGOCD_PORT:-3004}:3000" + environment: + - ARGOCD_URL=${ARGOCD_URL:-https://argocd.thedevops.dev} + - ARGOCD_TOKEN=${ARGOCD_TOKEN:-} + networks: + - mcp-network + healthcheck: + test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/health"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + logging: + driver: "json-file" + options: + max-size: "10m" + max-file: "3" + + # ───────────────────────────────────────────── + # Loki MCP + # Ask: "Show errors from argocd last 30m" + # "Find OOMKilled events cluster-wide" + # "Summarize grafana logs from yesterday" + # ───────────────────────────────────────────── + mcp-loki: + build: ./mcp-loki + container_name: ollama-mcp-loki + restart: unless-stopped + ports: + - "${MCP_LOKI_PORT:-3005}:3000" + environment: + - LOKI_URL=${LOKI_URL:-http://host.docker.internal:3100} + networks: + - mcp-network + extra_hosts: + - "host.docker.internal:host-gateway" + healthcheck: + test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/health"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + logging: + driver: "json-file" + options: + max-size: "10m" + max-file: "3" + + # ───────────────────────────────────────────── + # PostgreSQL MCP + # Ask: "Show table sizes in cesop_db" + # "Run EXPLAIN ANALYZE on this query" + # "List long-running queries" + # "Show index usage stats" + # ───────────────────────────────────────────── + mcp-postgres: + build: ./mcp-postgres + container_name: ollama-mcp-postgres + restart: unless-stopped + ports: + - "${MCP_POSTGRES_PORT:-3006}:3000" + environment: + - POSTGRES_HOST=${POSTGRES_HOST:-} + - POSTGRES_PORT=${POSTGRES_PORT:-5432} + - POSTGRES_DB=${POSTGRES_DB:-} + - POSTGRES_USER=${POSTGRES_USER:-} + - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-} + - POSTGRES_SSL=${POSTGRES_SSL:-false} + networks: + - mcp-network + healthcheck: + test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/health"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + logging: + driver: "json-file" + options: + max-size: "10m" + max-file: "3" + networks: mcp-network: driver: bridge ipam: config: - - subnet: 172.28.0.0/16 \ No newline at end of file + - subnet: 172.28.0.0/16