Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: aggressive Docker prune before oven builds to prevent disk-full

The 60GB oven droplet fills fast with Docker images and build cache.
Pre-build prune now removes images >2h old, all unused volumes, and
triggers a full system prune if <10GB free. Also installed a daily
systemd timer on oven for nightly cleanup at 4am.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+13 -2
+13 -2
oven/native-builder.mjs
··· 370 370 job.commitMsg = commitMsg; 371 371 const vmlinuzOut = `/tmp/oven-vmlinuz-${job.id}`; 372 372 373 - // Pre-build: prune stopped containers and dangling images to avoid disk-full failures 373 + // Pre-build: aggressive prune to avoid disk-full failures (60GB droplet fills fast) 374 374 addLogLine(job, "stdout", "Pre-build: Pruning Docker artifacts..."); 375 375 try { 376 376 await runPhase(job, "prune", "bash", ["-c", 377 - "docker container prune -f && docker builder prune -af --filter until=30m", 377 + "docker container prune -f && docker image prune -af --filter until=2h && docker builder prune -af --filter until=30m && docker volume prune -f", 378 378 ], repoDir); 379 + // Check free space — abort early if less than 10GB free 380 + const dfOut = await runSync("bash", ["-c", "df --output=avail / | tail -1"], repoDir); 381 + const availKB = parseInt(dfOut, 10) || 0; 382 + const availGB = availKB / 1048576; 383 + addLogLine(job, "stdout", ` Disk: ${availGB.toFixed(1)}GB free`); 384 + if (availGB < 10) { 385 + addLogLine(job, "stderr", ` WARNING: Only ${availGB.toFixed(1)}GB free — running full prune...`); 386 + await runPhase(job, "emergency-prune", "bash", ["-c", 387 + "docker system prune -af --volumes", 388 + ], repoDir); 389 + } 379 390 } catch { addLogLine(job, "stdout", " Prune skipped (non-fatal)"); } 380 391 381 392 // Phase 1: Docker image build (cached layers = fast)