Prune old image generations after each prod deploy
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:
@@ -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: |
|
||||
|
||||
Reference in New Issue
Block a user