feat: add PostgreSQL persistence for permanent shareable links

- Add PostgreSQL service to docker-compose with health checks
- Add migrate service that runs prisma migrate deploy on startup
- Integrate Prisma client in worker: checks for existing generations
  (same repo+commit) before regenerating, writes to Postgres on completion
- Update /api/docs/[id] with Redis → PostgreSQL fallback + cache repopulation
- Update Dockerfile: prisma generate in build, copy Prisma engine to worker/web
- Add @codeboard/database dependency to web and worker packages
- Add initial SQL migration for Generation and User tables
- Change removeOnComplete to { age: 3600 } for job retention
This commit is contained in:
Vectry
2026-02-09 20:23:41 +00:00
parent a49f05e8df
commit 30bfd88075
11 changed files with 170 additions and 6 deletions

View File

@@ -13,6 +13,7 @@
"@codeboard/parser": "*",
"@codeboard/llm": "*",
"@codeboard/diagrams": "*",
"@codeboard/database": "*",
"bullmq": "^5.34.0",
"ioredis": "^5.4.0",
"simple-git": "^3.27.0"