diff --git a/.dockerignore b/.dockerignore index 639a584..e48dc52 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,3 +5,8 @@ vendor/ legacy/ .git/ **/*.md +# The frontend builds from its own folder (with its own .dockerignore). The +# Rust images use only its src/content (a crate includes the tarot deck), so +# its dependencies and build output stay out: about 1 GB in every image layer. +services/frontend/node_modules/ +services/frontend/.next/ diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 531f18c..f0c3030 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -136,8 +136,11 @@ jobs: docker images "$IMAGE_PREFIX-$svc" --format '{{.Repository}}:{{.Tag}}' | xargs -r docker rmi >/dev/null 2>&1 || true done docker image prune -f >/dev/null - # A size cap, not an age: a busy day builds tens of gigabytes. - docker builder prune -af --max-used-space 10GB >/dev/null || true + # By age: with the containerd image store a size cap + # (--max-used-space) prunes nothing. Rust builds no longer carry + # the frontend's node_modules (.dockerignore), so a few days of + # cache stay small; the cargo cache mounts of recent builds stay. + docker builder prune -af --filter until=72h >/dev/null || true deploy: needs: build