# Ligbox Stack Services — catálogo Watchman (Spec 035)
# Fonte de verdade partilhada com Desk stack_health (Spec 033)
# Versão: 1.0 draft — 2026-06-22

version: "1.0"
defaults:
  timeout_sec: 8.0
  failures_before_alert: 2
  alert_repeat_minutes: 15

tiers:
  critical:
    interval_sec: 30
  standard:
    interval_sec: 60
  slow:
    interval_sec: 120

vms:
  - vm: "112"
    vm_label: "VM112 · Wizard & Mail"
    ip: "10.10.10.112"
    services:
      - id: vm112-onboard-api
        title: Onboard Portal API
        spec: "001"
        kind: app
        tier: standard
        probe:
          type: http
          url: "http://10.10.10.112:8090/api/onboarding/health"
          expect_status: [200]

      - id: vm112-onboard-ui
        title: Onboard Wizard UI
        spec: "025"
        kind: app
        tier: standard
        probe:
          type: http
          url: "https://onboard.ligbox.com.br/"
          expect_status: [200, 301, 302, 403]

      - id: vm112-carbonio
        title: Carbonio EmailServer
        spec: "022"
        kind: sw
        tier: slow
        probe:
          type: http
          url: "https://10.10.10.112/"
          verify_tls: false
          expect_status: [200, 301, 302, 403, 404]

      - id: vm112-domain-api
        title: Domain Admin API
        spec: "017"
        kind: api
        tier: standard
        probe:
          type: http
          url: "http://10.10.10.112:8090/api/onboarding/health"
          expect_status: [200]

  - vm: "114"
    vm_label: "CT114 · Edge Traefik"
    ip: "10.10.10.114"
    services:
      - id: vm114-traefik
        title: Traefik API
        spec: "026"
        kind: sw
        tier: critical
        probe:
          type: http
          url: "http://10.10.10.114:8080/api/overview"
          expect_status: [200, 401, 403]

      - id: vm114-desk-route
        title: Router Desk (WAN)
        spec: "026"
        kind: integration
        tier: critical
        probe:
          type: http
          url: "https://desk.ligbox.com.br/"
          expect_status: [200, 301, 302]

      - id: vm114-api-route
        title: Router API Ops (WAN)
        spec: "027"
        kind: integration
        tier: critical
        probe:
          type: http
          url: "https://api.ops.ligbox.com.br/health"
          expect_status: [200]

  - vm: "122"
    vm_label: "VM122 · Ops Desk"
    ip: "10.10.10.122"
    services:
      - id: vm122-desk-api
        title: Desk API (FastAPI)
        spec: "003"
        kind: app
        tier: critical
        probe:
          type: http
          url: "http://127.0.0.1:8080/health"
          expect_status: [200]

      - id: vm122-desk-ui
        title: Desk Frontend
        spec: "033"
        kind: app
        tier: critical
        probe:
          type: http
          url: "http://10.10.10.122:8091/"
          expect_status: [200, 301, 302]

      - id: vm122-redis
        title: Redis
        spec: "—"
        kind: sw
        tier: critical
        probe:
          type: redis
          url: "redis://127.0.0.1:6379/0"

      - id: vm122-docker-frontend
        title: Docker container frontend
        spec: "035"
        kind: sw
        tier: critical
        probe:
          type: docker
          container: ligbox-ops-platform_frontend_1
          expect_running: true

      - id: vm122-docker-api
        title: Docker container api
        spec: "035"
        kind: sw
        tier: critical
        probe:
          type: docker
          container: ligbox-ops-platform_api_1
          expect_running: true

  - vm: "123"
    vm_label: "VM123 · Finance & Hosting"
    ip: "10.10.10.123"
    services:
      - id: vm123-foss
        title: FOSSBilling
        spec: "024"
        kind: app
        tier: standard
        probe:
          type: http
          url: "http://10.10.10.123:8092/"
          expect_status: [200, 301, 302, 403]

      - id: vm123-odoo
        title: Odoo 16
        spec: "024"
        kind: app
        tier: standard
        probe:
          type: http
          url: "http://10.10.10.123:8069/web/login"
          expect_status: [200, 301, 302]

      - id: vm123-openpanel-ui
        title: OpenPanel CE
        spec: "028"
        kind: app
        tier: standard
        probe:
          type: http
          url: "https://openpanel.ligbox.com.br/"
          expect_status: [200, 301, 302, 403]

      - id: vm123-openadmin
        title: OpenAdmin
        spec: "024"
        kind: app
        tier: standard
        probe:
          type: http
          url: "https://admin.openpanel.ligbox.com.br/"
          expect_status: [200, 301, 302, 403]

      - id: vm123-openpanel-bridge
        title: OpenPanel FOSS Bridge
        spec: "028"
        kind: api
        tier: standard
        probe:
          type: http_bearer
          url: "http://10.10.10.123:18087/api"
          env_token: OPENPANEL_BRIDGE_TOKEN
          expect_status: [200, 401, 403]

      - id: vm123-ops-console
        title: Ops Console UI
        spec: "019"
        kind: app
        tier: standard
        probe:
          type: http
          url: "http://10.10.10.123:8100/health"
          expect_status: [200]

      - id: vm123-phpmyadmin
        title: phpMyAdmin
        spec: "—"
        kind: sw
        tier: slow
        probe:
          type: http
          url: "http://10.10.10.123:8888/"
          expect_status: [200, 301, 302, 403]

      - id: vm123-ollama
        title: Ollama LLM
        spec: "029"
        kind: api
        tier: slow
        probe:
          type: http
          url: "http://10.10.10.123:11434/api/tags"
          expect_status: [200]

  - vm: "130"
    vm_label: "CT130 · Spec Hub"
    ip: "10.10.10.130"
    services:
      - id: vm130-forgejo
        title: Forgejo Git
        spec: "031"
        kind: app
        tier: standard
        probe:
          type: http
          url: "http://10.10.10.130:3000/"
          expect_status: [200, 301, 302, 403]

      - id: vm130-spec-portal
        title: Spec Portal
        spec: "031"
        kind: app
        tier: standard
        probe:
          type: http
          url: "http://10.10.10.130:8080/"
          expect_status: [200]

      - id: vm130-spec-public
        title: Spec Hub (WAN)
        spec: "031"
        kind: integration
        tier: standard
        probe:
          type: http
          url: "https://spec.ligbox.com.br/"
          expect_status: [200, 301, 302]

# Fase 2 — descomentar quando activar
#  - vm: "104"
#    vm_label: "VM104 · Wazuh"
#    services: [...]
