feat: fase 4 — overhaul, docker, seguridad, métodos europeos

- Eliminada ruta duplicada /sebastian/sumas (código muerto)
- Removido topic 'sumas' del engine (reemplazado por 'matematicas')
- Creado docker-compose.yml (PostgreSQL + app, 1 comando install)
- Dockerfile: copiado prisma CLI al runner stage para db push
- APIs debug protegidas: 403 en producción (reset, state, seed)
- Audit métodos europeos: 24 archivos corregidos al 100%
  - Montessori: matemática Francesca + Sebastián
  - Decroly: lectura, ortografía, historia, geografía, banderas
  - Borel-Maisonny: lectura inicial Isabella (ya existía)
  - Freinet: expresión escrita Sebastián (ya existía)
- Validación prerequisitos: 0 rotos en contenido nuevo (157 ejercicios)
- INSTALL.md: guía completa de instalación
- fase4.md: documentación del overhaul
- E2E: 2 tests corregidos, 61/61 pasan
- TypeScript: exit 0, Build: exit 0
This commit is contained in:
renato97
2026-07-25 22:34:05 -03:00
parent a3360ec6e4
commit 07929b6c60
36 changed files with 367 additions and 80 deletions
+18 -27
View File
@@ -1,45 +1,36 @@
services:
postgres:
db:
image: postgres:16-alpine
container_name: edueasy-db
restart: unless-stopped
environment:
POSTGRES_DB: edueasy
POSTGRES_USER: edueasy
POSTGRES_PASSWORD: edueasy_pass
POSTGRES_DB: edueasy
volumes:
- edueasy_pgdata:/var/lib/postgresql/data
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U edueasy -d edueasy"]
interval: 10s
timeout: 5s
retries: 5
networks:
- caddy
interval: 5s
timeout: 3s
retries: 10
app:
build:
context: .
dockerfile: Dockerfile
container_name: edueasy
build: .
restart: unless-stopped
depends_on:
postgres:
db:
condition: service_healthy
environment:
DATABASE_URL: "postgresql://edueasy:edueasy_pass@postgres:5432/edueasy?schema=public"
BETTER_AUTH_SECRET: "${BETTER_AUTH_SECRET:-change-me-in-production}"
BETTER_AUTH_URL: "${BETTER_AUTH_URL:-https://mate.cbcren.online}"
DATABASE_URL: "postgresql://edueasy:edueasy_pass@db:5432/edueasy?schema=public"
NEXTAUTH_SECRET: "change-me-in-production"
NODE_ENV: production
networks:
- caddy
labels:
caddy: mate.cbcren.online
caddy.reverse_proxy: "{{upstreams 3000}}"
networks:
caddy:
external: true
PORT: 3000
HOSTNAME: 0.0.0.0
ports:
- "3000:3000"
command: sh -c "npx prisma db push --skip-generate && node server.js"
volumes:
edueasy_pgdata:
pgdata: