chore: reorganiza init-db do postgres
This commit is contained in:
@@ -71,7 +71,7 @@ AGGIOS-APP/
|
|||||||
│ └─ letsencrypt/
|
│ └─ letsencrypt/
|
||||||
│ └─ acme.json (auto-generated)
|
│ └─ acme.json (auto-generated)
|
||||||
│
|
│
|
||||||
├─ 📂 postgres/ ← PostgreSQL Setup (NOVO)
|
├─ 📂 backend/internal/data/postgres/ ← PostgreSQL Setup (NOVO)
|
||||||
│ └─ init-db.sql ✅ Initial schema
|
│ └─ init-db.sql ✅ Initial schema
|
||||||
│
|
│
|
||||||
├─ 📂 scripts/ ← Helper Scripts (NOVO)
|
├─ 📂 scripts/ ← Helper Scripts (NOVO)
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ aggios-app/
|
|||||||
│ ├─ dynamic/rules.yml
|
│ ├─ dynamic/rules.yml
|
||||||
│ └─ letsencrypt/
|
│ └─ letsencrypt/
|
||||||
│
|
│
|
||||||
├─ 📂 postgres/ .............................. PostgreSQL (NOVO)
|
├─ 📂 backend/internal/data/postgres/ ........ PostgreSQL (NOVO)
|
||||||
│ └─ init-db.sql
|
│ └─ init-db.sql
|
||||||
│
|
│
|
||||||
├─ 📂 scripts/ ............................... Scripts (NOVO)
|
├─ 📂 scripts/ ............................... Scripts (NOVO)
|
||||||
|
|||||||
@@ -106,8 +106,8 @@ aggios-app/
|
|||||||
│ ├── dynamic/rules.yml # Dynamic routing rules
|
│ ├── dynamic/rules.yml # Dynamic routing rules
|
||||||
│ └── letsencrypt/ # Certificados (auto-gerado)
|
│ └── letsencrypt/ # Certificados (auto-gerado)
|
||||||
│
|
│
|
||||||
├── postgres/ # Inicialização PostgreSQL
|
├── backend/internal/data/postgres/ # Inicialização PostgreSQL
|
||||||
│ └── init-db.sql # Schema initial
|
│ └── init-db.sql # Schema initial
|
||||||
│
|
│
|
||||||
├── scripts/
|
├── scripts/
|
||||||
│ ├── start-dev.sh # Start em Linux/macOS
|
│ ├── start-dev.sh # Start em Linux/macOS
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ DOCKER:
|
|||||||
|
|
||||||
CONFIGURAÇÃO:
|
CONFIGURAÇÃO:
|
||||||
├─ YAML files: 2 (traefik.yml, rules.yml)
|
├─ YAML files: 2 (traefik.yml, rules.yml)
|
||||||
├─ SQL files: 1 (init-db.sql)
|
├─ SQL files: 1 (backend/internal/data/postgres/init-db.sql)
|
||||||
├─ .env example: 1
|
├─ .env example: 1
|
||||||
├─ Dockerfiles: 1
|
├─ Dockerfiles: 1
|
||||||
└─ Scripts: 2 (start-dev.sh, start-dev.bat)
|
└─ Scripts: 2 (start-dev.sh, start-dev.bat)
|
||||||
|
|||||||
16
README.md
16
README.md
@@ -11,7 +11,7 @@ Plataforma composta por serviços de autenticação, painel administrativo (supe
|
|||||||
- `backend/`: API Go com serviços de autenticação, operadores e CRUD de agências (endpoints `/api/admin/agencies` e `/api/admin/agencies/{id}`).
|
- `backend/`: API Go com serviços de autenticação, operadores e CRUD de agências (endpoints `/api/admin/agencies` e `/api/admin/agencies/{id}`).
|
||||||
- `front-end-dash.aggios.app/`: painel Next.js – login do superadmin, listagem de agências, exibição detalhada e exclusão definitiva.
|
- `front-end-dash.aggios.app/`: painel Next.js – login do superadmin, listagem de agências, exibição detalhada e exclusão definitiva.
|
||||||
- `frontend-aggios.app/`: site institucional Next.js com suporte a temas claro/escuro e compartilhamento de tokens de design.
|
- `frontend-aggios.app/`: site institucional Next.js com suporte a temas claro/escuro e compartilhamento de tokens de design.
|
||||||
- `postgres/`: scripts de inicialização do banco (estrutura base de tenants e usuários).
|
- `backend/internal/data/postgres/`: scripts de inicialização do banco (estrutura base de tenants e usuários).
|
||||||
- `traefik/`: reverse proxy e certificados automatizados.
|
- `traefik/`: reverse proxy e certificados automatizados.
|
||||||
|
|
||||||
## Funcionalidades entregues
|
## Funcionalidades entregues
|
||||||
@@ -33,16 +33,16 @@ Plataforma composta por serviços de autenticação, painel administrativo (supe
|
|||||||
- Painel: `https://dash.localhost`
|
- Painel: `https://dash.localhost`
|
||||||
- Site: `https://aggios.app.localhost`
|
- Site: `https://aggios.app.localhost`
|
||||||
- API: `https://api.localhost`
|
- API: `https://api.localhost`
|
||||||
5. **Credenciais padrão**: ver `postgres/init-db.sql` para usuário superadmin seed.
|
5. **Credenciais padrão**: ver `backend/internal/data/postgres/init-db.sql` para usuário superadmin seed.
|
||||||
|
|
||||||
## Estrutura de diretórios (resumo)
|
## Estrutura de diretórios (resumo)
|
||||||
```
|
```
|
||||||
backend/ API Go (config, domínio, handlers, serviços)
|
backend/ API Go (config, domínio, handlers, serviços)
|
||||||
front-end-dash.aggios.app/ Dashboard Next.js Superadmin
|
backend/internal/data/postgres/ Scripts SQL de seed
|
||||||
frontend-aggios.app/ Site institucional Next.js
|
front-end-dash.aggios.app/ Dashboard Next.js Superadmin
|
||||||
postgres/ Scripts SQL de seed
|
frontend-aggios.app/ Site institucional Next.js
|
||||||
traefik/ Regras de roteamento e TLS
|
traefik/ Regras de roteamento e TLS
|
||||||
1. docs/ Documentação funcional e técnica
|
1. docs/ Documentação funcional e técnica
|
||||||
```
|
```
|
||||||
|
|
||||||
## Testes e validação
|
## Testes e validação
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ services:
|
|||||||
POSTGRES_DB: ${DB_NAME:-aggios_db}
|
POSTGRES_DB: ${DB_NAME:-aggios_db}
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
- ./postgres/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
|
- ./backend/internal/data/postgres/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD-SHELL", "pg_isready -U aggios -d aggios_db" ]
|
test: [ "CMD-SHELL", "pg_isready -U aggios -d aggios_db" ]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ services:
|
|||||||
POSTGRES_DB: aggios_db
|
POSTGRES_DB: aggios_db
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
- ./postgres/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
|
- ./backend/internal/data/postgres/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD-SHELL", "pg_isready -U aggios -d aggios_db" ]
|
test: [ "CMD-SHELL", "pg_isready -U aggios -d aggios_db" ]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
|
|||||||
Reference in New Issue
Block a user