docs(nc1): update inventory, architecture and deployment guide

This commit is contained in:
Tiago Yamamoto 2026-01-17 20:28:10 -06:00
parent 4998b01e07
commit 975557e10c
4 changed files with 83 additions and 1 deletions

View file

@ -60,6 +60,20 @@ flowchart LR
INVFE[Frontend App] INVFE[Frontend App]
end end
%% Virtual Fashion Ecosystem
subgraph VFashion ["Virtual Fashion"]
VFBE[Backend API]
VFFE[Frontend Web]
VFMIN[MinIO Storage]
end
%% Invoice Ninja Ecosystem
subgraph InvoiceNinja ["Invoice Ninja"]
INAPP[App FPM]
INWEB[Web Nginx]
INDB[(MariaDB)]
end
%% Rotas do Traefik %% Rotas do Traefik
T --> VW T --> VW
T --> FG T --> FG
@ -77,7 +91,12 @@ flowchart LR
T --> Q1ABE T --> Q1ABE
T --> Q1AFE T --> Q1AFE
T --> SXBE T --> SXBE
T --> SXBE
T --> SXFE T --> SXFE
T --> VFBE
T --> VFFE
T --> VFMIN
T --> INWEB
%% Conexões de Banco de Dados (Link Styles) %% Conexões de Banco de Dados (Link Styles)
linkStyle default stroke-width:2px,fill:none,stroke:gray; linkStyle default stroke-width:2px,fill:none,stroke:gray;
@ -92,7 +111,10 @@ flowchart LR
Q1ABE -.-> PG Q1ABE -.-> PG
SXBE -.-> PG SXBE -.-> PG
SIMB === PG SIMB === PG
SIMB === PG
SIMB === RD SIMB === RD
VFBE -.-> PG
INAPP === INDB
``` ```
## Descrição dos Componentes ## Descrição dos Componentes
@ -120,6 +142,15 @@ Plataformas de e-commerce. Backend em Go, Frontend em Node.js/React.
### 💰 Invent Finance ### 💰 Invent Finance
Sistema financeiro com separação clara entre Backend e Frontend. Sistema financeiro com separação clara entre Backend e Frontend.
### 👗 Virtual Fashion
Plataforma de moda virtual.
- **Backend/Frontend**: Node.js/Next.js.
- **Armazenamento**: MinIO para assets 3D/Imagens.
### 🧾 Invoice Ninja
Sistema de faturamento e gestão.
- **Stack**: PHP (App), Nginx (Web), MariaDB (Banco Dedicado).
## Infraestrutura de Dados ## Infraestrutura de Dados
- **PostgreSQL**: Instância única compartilhada entre todos os serviços (exceto Vaultwarden que pode ter seu próprio banco ou schema). - **PostgreSQL**: Instância única compartilhada entre todos os serviços (exceto Vaultwarden que pode ter seu próprio banco ou schema).

View file

@ -111,6 +111,24 @@ journalctl -u meu-app -n 100
--- ---
## e 💡 Boas Práticas (Patterns)
### Resiliência (Restart Policy)
Para garantir que o serviço suba automaticamente após falhas ou reboots:
```ini
[Service]
Restart=always
```
### Timeouts para Imagens Grandes
Se a imagem for grande (ex: Invoice Ninja, AI Models) e a rede lenta, aumente o timeout de inicialização para evitar que o systemd mate o processo durante o pull:
```ini
[Service]
TimeoutStartSec=900
```
---
## 📂 Estrutura de Diretórios Recomendada ## 📂 Estrutura de Diretórios Recomendada
Mantenha os volumes organizados em `/mnt/data/`: Mantenha os volumes organizados em `/mnt/data/`:

View file

@ -56,6 +56,18 @@ flowchart LR
SXBE[Backend] SXBE[Backend]
SXFE[Frontend] SXFE[Frontend]
end end
subgraph VirtualFashion
VFBE[Backend]
VFFE[Frontend]
VFMIN[MinIO]
end
subgraph InvoiceNinja
INWEB[Web]
INAPP[App]
INDB[(MariaDB)]
end
T --> VW T --> VW
T --> FG T --> FG
@ -74,6 +86,10 @@ flowchart LR
T --> Q1AFE T --> Q1AFE
T --> SXBE T --> SXBE
T --> SXFE T --> SXFE
T --> VFBE
T --> VFFE
T --> VFMIN
T --> INWEB
CIG --> PG CIG --> PG
CPP --> PG CPP --> PG
@ -85,6 +101,8 @@ flowchart LR
SXBE --> PG SXBE --> PG
SIMB --> PG SIMB --> PG
SIMB --> RD SIMB --> RD
VFBE --> PG
INAPP --> INDB
``` ```
> **Nota:** O cluster **Redis** é utilizado principalmente pelo **SaveInMed Backend** e outros serviços que requerem cache. Todos compartilham a mesma instância do **PostgreSQL**. > **Nota:** O cluster **Redis** é utilizado principalmente pelo **SaveInMed Backend** e outros serviços que requerem cache. Todos compartilham a mesma instância do **PostgreSQL**.
@ -109,6 +127,10 @@ flowchart LR
| **Q1 Agenda Frontend**| `dev.q1agenda.com.br` | 3000 | | **Q1 Agenda Frontend**| `dev.q1agenda.com.br` | 3000 |
| **Sextando API** | `api-dev.sextando.com.br` | 8080 | | **Sextando API** | `api-dev.sextando.com.br` | 8080 |
| **Sextando Web** | `dev.sextando.com.br` | 3001 | | **Sextando Web** | `dev.sextando.com.br` | 3001 |
| **Virtual Fashion API** | `api.virtualfashion.com.br` | 8000 |
| **Virtual Fashion Web** | `virtualfashion.com.br` | 3000 |
| **Virtual Fashion MinIO**| `minio.virtualfashion.com.br` | 9000 |
| **Invoice Ninja** | `invoiceninja.nc1.rede5.com.br` | 80 |
| **Vaultwarden** | `vault.rede5.com.br` | 80 | | **Vaultwarden** | `vault.rede5.com.br` | 80 |
--- ---
@ -137,6 +159,12 @@ flowchart LR
| `q1-total-dashboard-dev` | Q1 Total Dashboard (HML) | | `q1-total-dashboard-dev` | Q1 Total Dashboard (HML) |
| `q1agenda-backend-dev` | Q1 Agenda Backend (HML) | | `q1agenda-backend-dev` | Q1 Agenda Backend (HML) |
| `q1agenda-frontend-dev` | Q1 Agenda Frontend (HML) | | `q1agenda-frontend-dev` | Q1 Agenda Frontend (HML) |
| `virtual-fashion-backend`| Virtual Fashion Backend |
| `virtual-fashion-frontend`| Virtual Fashion Frontend |
| `virtual-fashion-minio` | Virtual Fashion Object Storage |
| `invoiceninja-app` | Invoice Ninja App (PHP) |
| `invoiceninja-web` | Invoice Ninja Web (Nginx) |
| `invoiceninja-db` | Invoice Ninja Database (MariaDB) |
| `pgadmin` | Administração PostgreSQL | | `pgadmin` | Administração PostgreSQL |
| `glances` | Monitoramento de sistema | | `glances` | Monitoramento de sistema |

View file

@ -20,6 +20,10 @@
| **Sextando FE** | `dev.sextando.com.br` | 3001 | - | Node.js/React | | **Sextando FE** | `dev.sextando.com.br` | 3001 | - | Node.js/React |
| **Invent BE** | `invent-api-dev.rede5.com.br` | 4763 | Postgres | Node.js | | **Invent BE** | `invent-api-dev.rede5.com.br` | 4763 | Postgres | Node.js |
| **Invent FE** | `invent-dev.rede5.com.br` | 3785 | - | Node.js/Next | | **Invent FE** | `invent-dev.rede5.com.br` | 3785 | - | Node.js/Next |
| **Virtual Fashion BE** | `api.virtualfashion.com.br` | 8000 | Postgres | Node.js |
| **Virtual Fashion FE** | `virtualfashion.com.br` | 3000 | - | Node.js/Next |
| **Virtual Fashion MinIO** | `minio.virtualfashion.com.br` | 9000 | - | MinIO |
| **Invoice Ninja Web** | `invoiceninja.nc1.rede5.com.br` | 80 | MariaDB | PHP/Nginx |
> (*) Verificar se este domínio está correto ou compartilhado. > (*) Verificar se este domínio está correto ou compartilhado.
@ -28,8 +32,9 @@
### PostgreSQL ### PostgreSQL
- **Container**: `postgres-main` - **Container**: `postgres-main`
- **Versão**: 15 (aprox) - **Versão**: 15 (aprox)
- **Porta**: 5432 (Rede Interna) - **Porta**: 5432 (Rede Interna) / 443 (Externo via Traefik TCP)
- **Volumes**: `/mnt/data/postgres:/var/lib/postgresql/data` - **Volumes**: `/mnt/data/postgres:/var/lib/postgresql/data`
- **Acesso Externo**: `db.nc1.rede5.com.br` (SSL/TLS)
### Redis ### Redis
- **Container**: `redis-saveinmed` - **Container**: `redis-saveinmed`