chore: reorganiza init-db do postgres
This commit is contained in:
@@ -71,7 +71,7 @@ AGGIOS-APP/
|
||||
│ └─ letsencrypt/
|
||||
│ └─ acme.json (auto-generated)
|
||||
│
|
||||
├─ 📂 postgres/ ← PostgreSQL Setup (NOVO)
|
||||
├─ 📂 backend/internal/data/postgres/ ← PostgreSQL Setup (NOVO)
|
||||
│ └─ init-db.sql ✅ Initial schema
|
||||
│
|
||||
├─ 📂 scripts/ ← Helper Scripts (NOVO)
|
||||
|
||||
@@ -77,7 +77,7 @@ aggios-app/
|
||||
│ ├─ dynamic/rules.yml
|
||||
│ └─ letsencrypt/
|
||||
│
|
||||
├─ 📂 postgres/ .............................. PostgreSQL (NOVO)
|
||||
├─ 📂 backend/internal/data/postgres/ ........ PostgreSQL (NOVO)
|
||||
│ └─ init-db.sql
|
||||
│
|
||||
├─ 📂 scripts/ ............................... Scripts (NOVO)
|
||||
|
||||
@@ -106,7 +106,7 @@ aggios-app/
|
||||
│ ├── dynamic/rules.yml # Dynamic routing rules
|
||||
│ └── letsencrypt/ # Certificados (auto-gerado)
|
||||
│
|
||||
├── postgres/ # Inicialização PostgreSQL
|
||||
├── backend/internal/data/postgres/ # Inicialização PostgreSQL
|
||||
│ └── init-db.sql # Schema initial
|
||||
│
|
||||
├── scripts/
|
||||
|
||||
@@ -228,7 +228,7 @@ DOCKER:
|
||||
|
||||
CONFIGURAÇÃO:
|
||||
├─ 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
|
||||
├─ Dockerfiles: 1
|
||||
└─ Scripts: 2 (start-dev.sh, start-dev.bat)
|
||||
|
||||
@@ -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}`).
|
||||
- `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.
|
||||
- `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.
|
||||
|
||||
## Funcionalidades entregues
|
||||
@@ -33,14 +33,14 @@ Plataforma composta por serviços de autenticação, painel administrativo (supe
|
||||
- Painel: `https://dash.localhost`
|
||||
- Site: `https://aggios.app.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)
|
||||
```
|
||||
backend/ API Go (config, domínio, handlers, serviços)
|
||||
backend/internal/data/postgres/ Scripts SQL de seed
|
||||
front-end-dash.aggios.app/ Dashboard Next.js Superadmin
|
||||
frontend-aggios.app/ Site institucional Next.js
|
||||
postgres/ Scripts SQL de seed
|
||||
traefik/ Regras de roteamento e TLS
|
||||
1. docs/ Documentação funcional e técnica
|
||||
```
|
||||
|
||||
@@ -46,7 +46,7 @@ services:
|
||||
POSTGRES_DB: ${DB_NAME:-aggios_db}
|
||||
volumes:
|
||||
- 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:
|
||||
test: [ "CMD-SHELL", "pg_isready -U aggios -d aggios_db" ]
|
||||
interval: 10s
|
||||
|
||||
@@ -38,7 +38,7 @@ services:
|
||||
POSTGRES_DB: aggios_db
|
||||
volumes:
|
||||
- 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:
|
||||
test: [ "CMD-SHELL", "pg_isready -U aggios -d aggios_db" ]
|
||||
interval: 10s
|
||||
|
||||
Reference in New Issue
Block a user