fix: include drizzle-orm and pg in serverExternalPackages for standalone migration

The entrypoint.sh migration script (migrate.mjs) imports
drizzle-orm/node-postgres/migrator which is never imported by app code.
Next.js standalone trace therefore omits it from node_modules, causing
the container to crash on startup before server.js runs.

Adding drizzle-orm and pg to serverExternalPackages ensures the full
packages are copied into the standalone output, fixing the migration
crash.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
CTO (LegalAI)
2026-04-09 14:41:18 +00:00
parent b22bdd8425
commit 09b0022b02

View File

@@ -2,7 +2,7 @@ import type { NextConfig } from "next";
const nextConfig: NextConfig = {
output: "standalone",
serverExternalPackages: ["pdf-parse"],
serverExternalPackages: ["pdf-parse", "drizzle-orm", "pg"],
};
export default nextConfig;