The 1.5GB heap cap was actually too aggressive for the Next 15 webpack
compile on this monorepo: V8 spirals into GC churn near the cap, runs
the host out of free memory, and oom-killer SIGKILLs the build (exit 255).
With 4GB on the host now:
- Cap V8 heap at 2.5GB (~70% of host RAM) — gives the compile real
headroom while leaving room for kernel + dockerd + concurrent COPY
layers from the collab/mcp runtime stages.
- Add depends_on so the lighter collab + mcp services finish building
before the web target starts its peak-memory compile, instead of
fighting it for memory in parallel.
Made-with: Cursor
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
Collapse Dockerfile.web / Dockerfile.collab / Dockerfile.mcp into a single
docker/Dockerfile with shared `deps` stage and `web` / `collab` / `mcp`
runtime targets. BuildKit hashes the deps stage identically for all three
targets, so `pnpm install` runs once instead of three times in parallel —
fixes the OOM kill on the Coolify host (CT 107) during `docker compose build`.
Both docker-compose.yml (local dev) and docker-compose.coolify.yml now
select services via `target:` instead of separate dockerfile paths.
Made-with: Cursor