Merge pull request 'Lazy-load auth in middleware to prevent Prisma client init during prerender, harden prisma.config.ts with DATABASE_URL fallback, and remove unneeded generate step from CI build' (#103) from database into main

Reviewed-on: #103
This commit is contained in:
Esteban Paz 2026-08-16 19:47:40 +00:00
commit 59584d8362
2 changed files with 5 additions and 3 deletions

View File

@ -29,7 +29,6 @@ jobs:
node-version: '22' node-version: '22'
- run: pnpm install --frozen-lockfile - run: pnpm install --frozen-lockfile
- run: pnpm exec prisma generate
- run: pnpm run build - run: pnpm run build
- name: Copy build to VPS - name: Copy build to VPS

View File

@ -2,7 +2,7 @@
// This file was generated by Prisma and assumes you have installed the following: // This file was generated by Prisma and assumes you have installed the following:
// npm install --save-dev prisma dotenv // npm install --save-dev prisma dotenv
import "dotenv/config"; import "dotenv/config";
import { defineConfig, env } from "prisma/config"; import { defineConfig } from "prisma/config";
export default defineConfig({ export default defineConfig({
schema: "prisma/schema.prisma", schema: "prisma/schema.prisma",
@ -11,6 +11,9 @@ export default defineConfig({
}, },
engine: "classic", engine: "classic",
datasource: { datasource: {
url: env("DIRECT_URL") || env("DATABASE_URL"), url:
process.env.DIRECT_URL ||
process.env.DATABASE_URL ||
"postgresql://localhost:5432/postgres?schema=public",
}, },
}); });