obsidian-vault/ligbox-ops-platform/deploy/vm123-finance-stack/README.md
2026-06-19 17:26:42 +00:00

117 lines
2.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# VM123 — FOSSBilling + OpenPanel + Odoo 16
Stack financeiro Ligbox (Spec 024).
## URLs
| URL | Serviço |
|-----|---------|
| `https://financeiro.ligbox.com.br/admin` | FOSSBilling Admin |
| `https://financeiro.ligbox.com.br/login` | FOSSBilling Cliente |
| `https://financeiro.ligbox.com.br/odoo/web/login?db=ligbox` | Odoo 16 |
| `https://openpanel.ligbox.com.br` | OpenPanel (host) |
> FOSSBilling está na **raiz** de `financeiro.ligbox.com.br` (não usar `/foss`).
## HW VM123
| Recurso | Valor |
|---------|--------|
| vCPU | 2 |
| RAM | 4 GB (+ swap 2 GB) |
| Disco | 25 GB |
| IP | `10.10.10.123` |
| SSH WAN | `:2523` (pfSense) |
## Utilizadores
| User | Senha | Notas |
|------|-------|-------|
| root | 805353 | manutenção |
| admin | 805353 | sudo |
| mini | 805353 | automação |
## Ordem de deploy
### 1. Proxmox (no host PVE)
```bash
bash deploy/vm123-finance-stack/proxmox-create-vm123.sh
```
Instalar Ubuntu 24.04, IP `10.10.10.123/24`, gw `10.10.10.1`.
### 2. Bootstrap VM
```bash
scp -r deploy/vm123-finance-stack root@10.10.10.123:/opt/
ssh root@10.10.10.123
bash /opt/vm123-finance-stack/bootstrap-vm123.sh
```
### 3. Docker — FOSS + Odoo
```bash
cd /opt/vm123-finance-stack
cp .env.example .env # editar passwords
docker compose up -d
```
- FOSSBilling wizard: `http://10.10.10.123:8092`
- DB host: `foss-mariadb`
- Odoo: `http://10.10.10.123:8069`
- criar base `ligbox` no wizard
### 4. OpenPanel (bare metal, mesma VM)
```bash
bash /opt/vm123-finance-stack/install-openpanel.sh
```
Enterprise recomendado (API + FOSSBilling).
### 5. Módulo FOSS ↔ OpenPanel
```bash
bash /opt/vm123-finance-stack/setup-foss-openpanel-module.sh
```
FOSSBilling Admin → **System → Hosting Plans and Servers****New Server** → OpenPanel (`2087`, user OpenAdmin).
### 6. Antispam FOSS (signup)
Após wizard FOSS ou rebuild do container:
```bash
bash /opt/vm123-finance-stack/setup-foss-antispam.sh
```
Evita bloqueio de cadastro por autocomplete no honeypot. Ver Spec 024 secção **Antispam**.
### 7. Traefik CT114
Merge `traefik-routes-snippet.yml` em `dynamic.yml` (pedir confirmação Roger).
DNS Cloudflare: `financeiro.ligbox.com.br`, `openpanel.ligbox.com.br` → IP público.
### 8. Wazuh agent
```bash
WAZUH_MANAGER=10.10.10.104 dpkg -i wazuh-agent_*.deb
systemctl enable wazuh-agent && systemctl start wazuh-agent
```
## RAM (4 GB — piloto)
| Componente | limite |
|------------|--------|
| OpenPanel host | ~11,5 GB |
| FOSS + MariaDB | ~768 MB |
| Odoo + Postgres | ~1,1 GB |
| SO + swap | restante |
Monitorizar: `free -h` e `docker stats`.
## Desk VM122
Spec 023: links para `financeiro.ligbox.com.br/admin` e ícone 💳 — integração fase seguinte.