Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions delivery-kid/ansible/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,13 @@
state: present
recreate: "{{ 'always' if (rebuild_images | default(false) | bool) else 'auto' }}"

# Cap BuildKit cache so repeated --rebuild / build:always deploys don't
# accumulate (we hit a 28GB / 337-entry cache on 2026-05-30 that took
# the host to 100% disk and killed the next deploy). -f prunes dangling
# cache only — active layers stay reusable; --keep-storage caps total.
- name: Cap Docker BuildKit cache at 3GB
command: docker builder prune -f --keep-storage 3GB

# Wait for IPFS container to be running (not API - that won't work until configured)
- name: Wait for IPFS container to start
command: docker inspect -f '{% raw %}{{.State.Running}}{% endraw %}' ipfs
Expand Down
6 changes: 6 additions & 0 deletions hunter/ansible/roles/build-image/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,9 @@
command: docker images magenta-arthel:latest --format "{% raw %}{{.Repository}}:{{.Tag}}{% endraw %}"
register: image_check
failed_when: "'magenta-arthel:latest' not in image_check.stdout"

# Cap BuildKit cache so repeated rebuilds (especially the periodic base-image
# bumps) don't accumulate unbounded. -f prunes dangling cache only —
# active layers stay reusable; --keep-storage caps total at 3GB.
- name: Cap Docker BuildKit cache at 3GB
command: docker builder prune -f --keep-storage 3GB
2 changes: 1 addition & 1 deletion pickipedia-vps/ansible/roles/docker-wiki/handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@

- name: Rebuild wiki container
command:
cmd: docker compose build --no-cache && docker compose up -d
cmd: docker compose build --no-cache && docker compose up -d && docker builder prune -f --keep-storage 3GB
chdir: /opt/pickipedia-docker
6 changes: 6 additions & 0 deletions pickipedia-vps/ansible/roles/docker-wiki/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@
cmd: docker compose build
chdir: /opt/pickipedia-docker

# Cap BuildKit cache so repeated deploys don't accumulate unbounded.
# -f prunes dangling cache only — active layers stay reusable;
# --keep-storage caps total at 3GB.
- name: Cap Docker BuildKit cache at 3GB
command: docker builder prune -f --keep-storage 3GB

# Now the quick switchover — stop nginx, start container
- name: Stop and disable nginx (replaced by Docker Apache)
systemd:
Expand Down