Skip to content

Technical guide · Overview

Page status: Active

NutsNews Backend Cleanup Maintenance

Backend issue ramideltoro/nutsnews-backend#41 adds fixed-purpose disk and

Visual overview

Primary diagram

System map

Backend issue ramideltoro/nutsnews-backend#41 adds fixed-purpose disk and

Render the repository-owned system map when you need it.

Diagram is not rendered yet.

View as text
NutsNews Backend Cleanup Maintenance

Backend issue ramideltoro/nutsnews-backend#41 adds fixed-purpose disk and

flowchart TB
  accTitle: NutsNews Backend Cleanup Maintenance
  accDescr {
    Backend issue ramideltoro/nutsnews-backend#41 adds fixed-purpose disk and
  }
  A["NutsNews Backend Cleanup Maintenance"] --> B["NUTSNEWS_BACKEND_CLEANUP_MAINTENANCE.md"]
  B --> C["Auto-generated placeholder diagram"]

NutsNews Backend Cleanup Maintenance

Fullscreen diagram view.

Backend issue ramideltoro/nutsnews-backend#41 adds fixed-purpose disk and Docker cleanup automation for 65.75.201.18.

Workflow:

Backend Cleanup Maintenance

Actions:

  • report: inventory disk, inode, Docker, temp, apt-cache, log, Caddy, and backup cleanup surfaces without cleanup commands.
  • dry-run: run non-mutating candidate listing commands only.
  • apply: run the fixed cleanup command set only after production-backend approval and confirm_apply=backend.nutsnews.com.

The workflow does not accept arbitrary remote commands.

Allowlisted cleanup targets:

  • stale files older than 7 days under /tmp and /var/tmp;
  • downloaded apt package archives under /var/cache/apt/archives;
  • dangling Docker images;
  • Docker build cache older than 7 days.

Protected state:

  • Caddy state and certificates;
  • Docker named volumes;
  • backend backup state/repositories;
  • PostgreSQL data;
  • app persistent data;
  • ops dashboard files;
  • home/root/etc state.

The implementation explicitly refuses docker volume prune and docker system prune --volumes.

Each run uploads backend-cleanup-maintenance-report.json and writes a GitHub summary. The backend health report also exposes cleanup_last_run from:

/var/lib/nutsnews/cleanup/last-cleanup.json

Until an approved apply writes that file, health reports show cleanup_last_run=not_configured.

Read-only live inventory on July 17, 2026:

  • root disk usage: 8%;
  • root inode usage: 2%;
  • Docker: inactive/not installed;
  • stale temp-file candidates: 0;
  • apt package cache: about 469 MB;
  • cleanup last-run state: not_configured.