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",