Files
caddy-proxy-manager/package.json
Claude ad07fd4c13 Fix Prisma client generation in Docker build following best practices
Following the Prisma guide for GitHub Actions and CI/CD, this commit addresses
the Prisma client generation issues in the Docker build process:

Changes:
1. **package.json**:
   - Removed silent failure fallback in postinstall hook
   - Removed redundant prisma generate from build script
   - Now fails fast if Prisma generation has issues

2. **docker/web/Dockerfile**:
   - Added DATABASE_URL environment variable in deps stage
   - Explicitly run prisma generate after npm install to ensure client is created
   - Generate Prisma client again in builder stage for build context
   - Removed --skip-generate flag from prisma db push
   - Added clear comments explaining each Prisma-related step

These changes ensure:
- Prisma client is generated with correct engines for debian-openssl-3.0.x
- Build fails early if there are Prisma configuration issues
- DATABASE_URL is set before running any Prisma commands
- Proper multi-stage Docker build with Prisma support
2025-11-06 21:17:23 +00:00

38 lines
1023 B
JSON

{
"name": "caddy-proxy-manager",
"version": "1.0.0",
"description": "Caddy Proxy Manager - web UI for managing Caddy reverse proxies with OAuth2 authentication.",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"typecheck": "tsc --noEmit",
"postinstall": "prisma generate"
},
"dependencies": {
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.1",
"@mui/icons-material": "^7.3.5",
"@mui/material": "^7.3.4",
"@prisma/client": "^6.18.0",
"@types/better-sqlite3": "^7.6.13",
"bcryptjs": "^3.0.3",
"better-sqlite3": "^12.4.1",
"next": "^16.0.1",
"next-auth": "^5.0.0-beta.30",
"prisma": "^6.18.0",
"react": "^19.2.0",
"react-dom": "^19.2.0"
},
"devDependencies": {
"@types/node": "^24.10.0",
"@types/react": "^19.2.2",
"@types/react-dom": "^19.2.2",
"eslint": "^9.39.1",
"eslint-config-next": "^16.0.1",
"typescript": "^5.9.3"
}
}