next build was OOM-killed (exit 255) on the Coolify host during 'Linting and checking validity of types' — tsc pulls the whole type graph into memory and pushes the build past available RAM. Type-checking and linting belong in CI / pre-commit, not in the prod container build. Skip them via next.config and cap the Node heap to 1.5 GB so any future memory blow-up surfaces as a JS OOM instead of a SIGKILL. Made-with: Cursor
29 lines
942 B
TypeScript
29 lines
942 B
TypeScript
import type { NextConfig } from "next";
|
|
import path from "path";
|
|
|
|
/**
|
|
* Production Docker build: enables `output: "standalone"` and correct file tracing
|
|
* for the pnpm monorepo. Copied over `apps/web/next.config.ts` during `docker build`.
|
|
*/
|
|
const nextConfig: NextConfig = {
|
|
output: "standalone",
|
|
transpilePackages: ["@tasks/ai", "@tasks/database", "@tasks/shared"],
|
|
outputFileTracingRoot: path.join(__dirname, "../.."),
|
|
// Type-checking and linting are enforced in CI / locally via `pnpm lint` and
|
|
// `pnpm typecheck`. Re-running them inside `next build` on the Coolify host
|
|
// spawns a tsc worker that can push memory past what the LXC has available
|
|
// and triggers an OOM kill (exit 255) mid-build. Skip them here.
|
|
typescript: {
|
|
ignoreBuildErrors: true,
|
|
},
|
|
eslint: {
|
|
ignoreDuringBuilds: true,
|
|
},
|
|
experimental: {
|
|
serverActions: {
|
|
bodySizeLimit: "2mb",
|
|
},
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|