Prune old image generations after each prod deploy
Deploy to Dev / Deploy & Smoke Test (push) Successful in 22s
Deploy to Prod / Deploy & Smoke Test (prod) (push) Successful in 42s

Each promotion pulls a uniquely SHA-tagged image, so without cleanup
old generations accumulate indefinitely. CT111's disk is small (was
5.9GB, just grown to 8.8GB) and filled up mid-pull on the first real
promotion attempt. Prune dangling images after up -d swaps traffic to
the new containers, once their predecessors are no longer referenced.
This commit is contained in:
2026-07-20 05:30:06 +00:00
parent 016256cd2f
commit c97f1f73ce
+3 -1
View File
@@ -44,7 +44,9 @@ jobs:
export IMAGE_TAG=$SHA
docker compose -f docker-compose.yml -f docker-compose.deploy.yml pull
docker compose -f docker-compose.yml -f docker-compose.deploy.yml up -d
echo "Deployed $SHA (pulled, not built)"'
echo "Deployed $SHA (pulled, not built)"
docker image prune -af
echo "Pruned old image generations"'
- name: Wait for health check
run: |