# VM122 — Ligbox Ops Desk (motor)

| Item | Valor |
|------|-------|
| **IP LAN** | `10.10.10.122` |
| **SSH WAN** | `95.216.14.146:2522` |
| **Hostname** | ligbox-ops |
| **URLs** | `desk.ligbox.com.br` · `api.ops.ligbox.com.br` |

## Papel

- API FastAPI + SQLite + Redis + Worker
- UI Desk MVP (vanilla JS)
- Webhook ingress VM112 / Wazuh
- Agentic ops (Spec 029)

## No repo Git (CT130)

```
api/ frontend/ worker/          # Código principal
.specify/ specs/                # Spec Kit memory + specs
docker-compose.mvp.yml
deploy/vm122-fossbilling/       # Stack legado (se activo)
```

## Specs principais VM122

- 003 desk-auth-rbac
- 004 desk-account-management
- 009 ops-audit-overview
- 010 desk-assist-takeover
- 012 abandoned-onboarding-lead
- 015 desk-module-registry
- 027 desk-rbac-function-matrix
- 029 agentic
- **037** dns-viewer (V1–V2 API + Desk UI — `dns_viewer.py`, `dns-viewer.js`)

## DNS Viewer (Spec 037)

| Fase | Estado | Path runtime |
|------|--------|--------------|
| V1 API | ✅ | `/opt/ligbox-ops-platform/api/app/dns_viewer.py` |
| V1b Desk UI | ✅ | `frontend/assets/dns-viewer.js` |
| V2 OpenPanel | ✅ | `api/app/openpanel_dns.py` |
| V3 proxy Console | ✅ | `api/app/domain_console_routes.py` |

Feature flag: `DNS_VIEWER_ENABLED=1` em `.env`. Rollback: `specs/037-.../deploy/DNS-VIEWER-ROLLBACK.md`.

**Deploy API:** container Docker — após rsync, `docker cp api/app/. ligbox-ops-platform_api_1:/app/app/` + restart.

## Deploy

```bash
cd /opt/ligbox-ops-platform
git pull origin main
docker compose -f docker-compose.mvp.yml up -d --build
```

## Integração

- **← VM112:** webhooks onboard
- **← VM104:** alertas Wazuh
- **→ VM123:** deep-links finance · APIs FOSS/Odoo
- **→ CT130:** push specs/git (fonte de verdade)
