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
This commit is contained in:
parent
5587f9fb76
commit
ce5452a91a
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue