Fix: Allow prisma generate without DATABASE_URL
Build and Push Docker Image / lint-and-typecheck (push) Successful in 1m46s Details
Build and Push Docker Image / build (push) Successful in 4m43s Details

Use placeholder URL during build - only real URL needed for migrations.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Matt 2026-01-17 15:33:49 +01:00
parent 8157531fba
commit a71ef8f9fc
1 changed files with 2 additions and 5 deletions

View File

@ -6,11 +6,8 @@ try {
// dotenv not available (e.g., in Docker) - env vars passed directly // dotenv not available (e.g., in Docker) - env vars passed directly
} }
const databaseUrl = process.env.DATABASE_URL // DATABASE_URL is optional during build (prisma generate), required for migrations
const databaseUrl = process.env.DATABASE_URL || 'postgresql://placeholder:placeholder@localhost:5432/placeholder'
if (!databaseUrl) {
throw new Error('DATABASE_URL environment variable is required')
}
export default { export default {
schema: 'prisma/schema.prisma', schema: 'prisma/schema.prisma',