18 Commits

Author SHA1 Message Date
dfa5f9611f fix: resolve Prisma Query Engine runtime error in Docker
Critical fix for production deployment on Proxmox/Docker.

Problem:
- Runtime error: Prisma Client could not locate Query Engine for "debian-openssl-1.1.x"
- Wrong binary target generated (Windows dll instead of Linux .so.node)
- Wrong OpenSSL version (3.0.x instead of 1.1.x for Debian 11)

Root cause:
- Schema.prisma didn't specify binaryTargets
- Prisma auto-detected Windows during local development
- Debian 11 (bullseye) uses OpenSSL 1.1.x, not 3.0.x

Solution:
1. Add binaryTargets to schema.prisma:
   - "debian-openssl-1.1.x" for Docker/Proxmox
   - "native" for local development

2. Fix Prisma folder permissions in Docker:
   - RUN chown -R nextjs:nodejs /app/prisma
   - Ensures Query Engine binary is readable by app user

Changes:
- prisma/schema.prisma: Add binaryTargets = ["debian-openssl-1.1.x", "native"]
- keep-notes/Dockerfile: Add chown for /app/prisma folder

Verification:
✓ libquery_engine-debian-openssl-1.1.x.so.node exists
✓ Permissions: nextjs:nodejs (readable)
✓ Prisma Client loads successfully in container

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-12 21:30:03 +01:00
f5cda3843b fix: copy Prisma Query Engine binaries in Docker standalone output
Fixes runtime error where Prisma Client could not locate the Query Engine:
"libquery_engine-debian-openssl-1.1.x.so.node" not found

Root cause:
- Next.js standalone output does not include Prisma Query Engine binaries
- The .prisma folder in node_modules contains the required binary files

Solution:
- Copy node_modules/.prisma folder in Docker runner stage
- This includes libquery_engine-debian-openssl-1.1.x.so.node
- Prisma Client can now find and load the Query Engine at runtime

Tested:
✓ Docker build successful
✓ Container starts without Prisma errors
✓ Application ready in 40ms

Changes:
- keep-notes/Dockerfile: Add COPY for node_modules/.prisma folder

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-12 21:20:56 +01:00
ff110b735c fix: resolve Docker Compose build failure with Prisma Client generation
Fix critical issue where `docker compose build` was failing with:
"Module not found: Can't resolve '../prisma/client-generated'"

Root cause:
- Next.js build requires Prisma Client during webpack compilation
- Prisma Client was not being generated before the Next.js build step

Changes:
1. keep-notes/Dockerfile:
   - Add explicit `RUN npx prisma generate` in builder stage before `npm run build`
   - Ensures client-generated directory exists when Next.js compiles

2. keep-notes/package.json:
   - Update build script: "prisma generate && next build --webpack"
   - Double-protection: runs prisma generate both in Dockerfile and build script

3. docker-compose.yml:
   - Remove obsolete `version: '3.8'` attribute (deprecated in Docker Compose v2)

Result:
✓ Docker build now completes successfully
✓ Prisma Client generated at ./prisma/client-generated
✓ Next.js webpack compilation finds the client module

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-12 21:12:47 +01:00
78dd42c056 fix: generate Prisma in runner after copying all node_modules - guaranteed to work 2026-01-12 20:28:27 +01:00
074dce6910 fix: switch to Debian 11 (bullseye) for native OpenSSL 1.1.x - no more Prisma issues 2026-01-12 00:38:14 +01:00
df70ccbd62 fix: force PRISMA_BINARY_TARGETS env var to override OpenSSL detection 2026-01-12 00:34:17 +01:00
fab371228a fix: simplify Dockerfile with correct OpenSSL 3 setup for Debian 12 2026-01-12 00:27:04 +01:00
c770a993ff fix: copy entire .next/server directory (no wildcards in COPY) 2026-01-12 00:23:18 +01:00
32e36b5288 fix: copy Prisma engines to .next/server for Next.js 2026-01-12 00:18:49 +01:00
ebfb2276ea fix: copy Prisma binaries to all search locations 2026-01-12 00:14:14 +01:00
ea5dc73c1f fix: switch to Debian Slim for Prisma compatibility 2026-01-12 00:07:09 +01:00
aa3c741135 fix: use libssl1.1 for Prisma on Alpine 2026-01-12 00:05:26 +01:00
7d3e633af9 fix: install openssl1.1-compat for Prisma on Alpine 2026-01-12 00:03:15 +01:00
b85841248d chore(docker): update Docker and Next.js config 2026-01-11 23:38:35 +01:00
bee5234944 chore: miscellaneous fixes 2026-01-11 23:26:55 +01:00
1678bcaced chore(docker): tweak deployment docs and scripts; update package metadata 2026-01-11 23:20:34 +01:00
3854a3e302 chore(docker): Add Dockerfile for deployment 2026-01-11 23:10:54 +01:00
15a95fb319 Add BMAD framework, authentication, and new features 2026-01-08 21:23:23 +01:00