Originally created by: grynn-in
Deploying konsol main on 12 Sep 2026 to the local stack (colima: 4 CPU, 8 GiB) failed at Step 2/5. bench build --app konsol → yarn build exited 137 (Killed).
The VM kernel log (colima ssh -- sudo dmesg) shows a global OOM that killed the node (vite) build processes and clickhouse-server (pid 1857171). ClickHouse's RestartCount is 3, so earlier kills happened too; restart: unless-stopped brought it back silently every time.
deploy.sh:277:
docker compose --profile setup --profile backup build
With those profiles, six services have a build: section, and all six build the same context and Dockerfile with no shared image:: backup, configurator, dbt_init, frappe_backend, frappe_scheduler, frappe_worker → docker/frappe/Dockerfile.
When the konsol source changes, COPY konsol /tmp/konsol (Step 11/22) misses the cache for every one of them. Compose builds them concurrently, so six RUN bench get-app /tmp/konsol steps each run vite build at about 700 MB RSS, on top of the running stack. The failed log shows five Running in … containers side by side at Step 12/22.
What deploy.sh does NOT do: build the image once and reuse it.
export COMPOSE_PARALLEL_LIMIT=1 before line 277, or docker compose --parallel 1 … build (Compose 5.1.4 supports both). A redeploy with COMPOSE_PARALLEL_LIMIT=1 ran one vite build in total, because services 2–6 came from the first build's layer cache. It exited 0, and ClickHouse was not restarted (RestartCount stayed 3).frappe_backend an image: konsolidat-frappe:latest, and point the other five services at that image: with no build: section. That removes both the duplicated work and the memory spike.On an 8 GiB colima VM with the stack running: change any file in the konsol checkout, then run KONSOL_REPO=… KONSOL_BRANCH=main ./deploy.sh. Watch for Killed / exit 137 during Step 2, and Out of memory: Killed process … (clickhouse-serv) in the VM's dmesg.
🤖 Generated with Claude Code
Ticket changed by: grynn-in