feat: add database seed with demo data and Docker Compose setup

- Seed creates demo tenant, users (admin, contador, visor)
- Creates tenant schema with cfdis, iva_mensual, alertas tables
- Inserts 50 demo CFDIs and 6 months of IVA records
- Docker Compose with PostgreSQL, API, and Web services
- Demo credentials: admin/contador/visor @demo.com / demo123

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Consultoria AS
2026-01-22 02:02:30 +00:00
parent 9986bc1dd3
commit 79b771b650
2 changed files with 255 additions and 0 deletions

53
docker-compose.yml Normal file
View File

@@ -0,0 +1,53 @@
version: '3.8'
services:
postgres:
image: postgres:16-alpine
container_name: horux360-db
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: horux360
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
api:
build:
context: .
dockerfile: apps/api/Dockerfile
container_name: horux360-api
environment:
NODE_ENV: development
PORT: 4000
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/horux360?schema=public
JWT_SECRET: your-super-secret-jwt-key-min-32-chars-long-for-development
JWT_EXPIRES_IN: 15m
JWT_REFRESH_EXPIRES_IN: 7d
CORS_ORIGIN: http://localhost:3000
ports:
- "4000:4000"
depends_on:
postgres:
condition: service_healthy
web:
build:
context: .
dockerfile: apps/web/Dockerfile
container_name: horux360-web
environment:
NEXT_PUBLIC_API_URL: http://localhost:4000/api
ports:
- "3000:3000"
depends_on:
- api
volumes:
postgres_data: