From 70c9bbf1e5f78b29b1a76b3098ef24771b087225 Mon Sep 17 00:00:00 2001 From: Randall Stillwell Date: Mon, 27 Apr 2026 14:58:12 -0500 Subject: [PATCH] docker: skip type-check + lint during prod web build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- docker/Dockerfile | 3 +++ docker/next.config.docker.ts | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index 27cd8d1..f10a608 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -51,6 +51,9 @@ COPY docker/next.config.docker.ts ./apps/web/next.config.ts ENV NEXT_TELEMETRY_DISABLED=1 ENV NODE_ENV=production +# Cap V8 heap so we get a clean JS OOM instead of a kernel SIGKILL (exit 255) +# if memory pressure spikes during the build on small hosts. +ENV NODE_OPTIONS=--max-old-space-size=1536 RUN pnpm exec turbo build --filter=@tasks/web diff --git a/docker/next.config.docker.ts b/docker/next.config.docker.ts index 11e5e74..3b7f42c 100644 --- a/docker/next.config.docker.ts +++ b/docker/next.config.docker.ts @@ -9,6 +9,16 @@ 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",