docker: skip type-check + lint during prod web build
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
This commit is contained in:
parent
3fa891bf08
commit
70c9bbf1e5
2 changed files with 13 additions and 0 deletions
|
|
@ -51,6 +51,9 @@ COPY docker/next.config.docker.ts ./apps/web/next.config.ts
|
||||||
|
|
||||||
ENV NEXT_TELEMETRY_DISABLED=1
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
ENV NODE_ENV=production
|
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
|
RUN pnpm exec turbo build --filter=@tasks/web
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,16 @@ const nextConfig: NextConfig = {
|
||||||
output: "standalone",
|
output: "standalone",
|
||||||
transpilePackages: ["@tasks/ai", "@tasks/database", "@tasks/shared"],
|
transpilePackages: ["@tasks/ai", "@tasks/database", "@tasks/shared"],
|
||||||
outputFileTracingRoot: path.join(__dirname, "../.."),
|
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: {
|
experimental: {
|
||||||
serverActions: {
|
serverActions: {
|
||||||
bodySizeLimit: "2mb",
|
bodySizeLimit: "2mb",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue