Improve catalog studio UX and aggressive docker cleanup
Catalog Studio: - Cross-parent drag & drop now uses optimistic updates with rollback on failure (no more full tree reload / visible delay) - Subpage creation adds the node optimistically then refreshes parent only (was full tree reload) - Single page deletion refreshes only the affected parent (was full tree reload) - Root page creation replaces native prompt() with an inline input in the root tab bar - Escape key no longer closes the dialog when an input field is focused - TreeNodeUpdate type now supports parentId and orderNum for optimistic structural changes Docker: - docker-prune.sh default mode now aggressively cleans all unreferenced build cache, images >1h old, and stopped containers >1h old (was 72h/7d/24h which let cache grow past 80% on every push)
This commit is contained in:
1 parent
349188af10
commit
1a9e1e791a
6 files changed
+217
-40
No files matched your search
+10
-12
@@ -2,17 +2,15 @@
|
||||
# Reclaim Docker's unused cache so host storage stays bounded.
|
||||
#
|
||||
# Modes:
|
||||
# (default) — gentle, age-windowed (keeps rollback + rebuild speed):
|
||||
# - BuildKit cache older than 72h, hard-capped at 4 GB (Debian /pnpm store
|
||||
# is shared across builds; everything newer speeds up rebuilds).
|
||||
# - Images referenced by NO container and older than 7 days.
|
||||
# - Containers stopped for more than 24h.
|
||||
# --force — emergency mode ("never let the disk max out"): drops every age
|
||||
# window and reclaims all unused bytes Docker can free:
|
||||
# (default) — post-deploy cleanup (safe, fast):
|
||||
# - ALL unreferenced build cache (new build will re-populate what it needs).
|
||||
# - ALL unreferenced images older than 1h (keeps current image + very recent).
|
||||
# - ALL stopped containers older than 1h.
|
||||
# --force — emergency mode ("never let the disk max out"): drops everything
|
||||
# with no age windows:
|
||||
# - ALL unreferenced build cache,
|
||||
# - ALL unreferenced images (no 7-day grace),
|
||||
# - ALL unreferenced images (no age grace),
|
||||
# - ALL stopped containers.
|
||||
# Trade-off: waiting rebuilds re-fetch deps/images later.
|
||||
#
|
||||
# Volumes are NEVER pruned in either mode: mariadb-turbo-data is a database.
|
||||
# Idempotent; exits 0 when Docker is unavailable.
|
||||
@@ -41,9 +39,9 @@ if (( FORCE )); then
|
||||
docker image prune -af >>"$LOG_FILE" 2>&1 || true
|
||||
docker container prune -f >>"$LOG_FILE" 2>&1 || true
|
||||
else
|
||||
docker builder prune -af --filter "until=72h" --max-used-space=4g >>"$LOG_FILE" 2>&1 || true
|
||||
docker image prune -af --filter "until=168h" >>"$LOG_FILE" 2>&1 || true
|
||||
docker container prune -f --filter "until=24h" >>"$LOG_FILE" 2>&1 || true
|
||||
docker builder prune -af >>"$LOG_FILE" 2>&1 || true
|
||||
docker image prune -af --filter "until=1h" >>"$LOG_FILE" 2>&1 || true
|
||||
docker container prune -f --filter "until=1h" >>"$LOG_FILE" 2>&1 || true
|
||||
fi
|
||||
|
||||
printf '\n[%s] === docker prune complete%s ===\n' "$(now)" "$( (( FORCE )) && printf ' (FORCE)' )" >>"$LOG_FILE"
|
||||
|
||||
Reference in new issue
Block a user