- Botón 'Volver' en todas las sesiones de ejercicios (ExerciseSession) - Botón 'Cambiar perfil' en las 3 home pages (Isabella/Francesca/Sebastián) - Páginas inline de Isabella migradas a ExerciseSession (elimina código duplicado) - APIs con try/catch: curriculum/next, dashboard/summary, fsrs/next, children - Validación childId en curriculum/next (404 si no existe) - /api/health endpoint para Docker healthcheck - .env.example, .dockerignore, README.md creados - docker-compose.yml con healthcheck en app service - Test E2E: health endpoint + childId validation - 62/62 tests pasan, TS exit 0
42 lines
1012 B
YAML
42 lines
1012 B
YAML
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: edueasy
|
|
POSTGRES_PASSWORD: edueasy_pass
|
|
POSTGRES_DB: edueasy
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U edueasy -d edueasy"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 10
|
|
|
|
app:
|
|
build: .
|
|
restart: unless-stopped
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
environment:
|
|
DATABASE_URL: "postgresql://edueasy:edueasy_pass@db:5432/edueasy?schema=public"
|
|
NEXTAUTH_SECRET: "change-me-in-production"
|
|
NODE_ENV: production
|
|
PORT: 3000
|
|
HOSTNAME: 0.0.0.0
|
|
ports:
|
|
- "3000:3000"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -qO- http://localhost:3000/api/health || exit 1"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
command: sh -c "npx prisma db push --skip-generate && node server.js"
|
|
|
|
volumes:
|
|
pgdata:
|