# Console v2 — Rollback (Fase 1)

**Data:** 2026-06-25  
**Spec:** 019 · **Exec:** CONSOLE-V2-F1-20260625  
**Ambiente:** VM123 (`10.10.10.123`) · CT114 Traefik · `console.ligbox.com.br`

---

## O que mudou (Fase 1)

| Área | Alteração |
|------|-----------|
| Console home | KPI bar, Saúde plataforma (ex-Overview), Domínios com atenção, Incidentes Agentic, Atalhos |
| Desk VM122 | Banners de migração em Dashboard, Overview, Eventos, Tickets |
| Repo | `specs/019-.../deploy/frontend/src/*` + docs |

**Não alterado nesta fase:** CT114 Traefik, DNS, `/etc/network/interfaces`, VM112, rota `/ops` (home continua em `/`).

---

## Pré-requisitos rollback

Backups criados **antes** do deploy v2:

```bash
ssh root@10.10.10.123
ls -la /opt/ligbox-ops-console/frontend.bak-v2-*
docker images | grep ops-console
```

Git no CT130:

```bash
cd /opt/ligbox-spec-hub/repos/ligbox-ops-platform
git log --oneline -5
```

---

## Rollback rápido — só frontend VM123

```bash
ssh root@10.10.10.123
cd /opt/ligbox-ops-console
BACKUP=$(ls -td frontend.bak-v2-* 2>/dev/null | head -1)
if [ -n "$BACKUP" ]; then
  rm -rf frontend
  cp -a "$BACKUP" frontend
fi
docker compose build --no-cache && docker compose up -d
curl -sS -o /dev/null -w '%{http_code}\n' http://127.0.0.1:8100/health
```

---

## Rollback imagem Docker

```bash
docker tag ligbox/ops-console:pre-v2-YYYYMMDD ligbox/ops-console:latest
docker compose up -d
```

---

## Rollback código (CT130)

```bash
cd /opt/ligbox-spec-hub/repos/ligbox-ops-platform
git revert <commit-v2> --no-edit
./portal/refresh-spec-driver.sh
rsync -a specs/019-ops-console-active-operations/ \
  /opt/ligbox-spec-hub/obsidian-vault/ligbox-ops-platform/specs/019-ops-console-active-operations/
```

---

## Referências

- G1 Traefik: `deploy/traefik/G1-ROLLBACK.md`
- Inventário: `docs/network/VM123_INVENTARIO.md`
