Skip to content

Commit f74faeb

Browse files
authored
Do the system prune on cron (#48)
* Remove the app container after it's finished * That didn't work, let's prune the system with cron
1 parent e5b52b1 commit f74faeb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

deploy/playbook.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,11 @@
8585
minute: "*/5"
8686
job: "cd /srv && docker compose run app make all"
8787

88-
- name: Do a system prune to avoid running out of disk space
89-
shell: "docker system prune -f"
88+
- name: Periodically do a system prune
89+
ansible.builtin.cron:
90+
name: Docker system prune
91+
minute: "*/5"
92+
job: "docker system prune -f"
9093

9194
- name: Start Docker compose
9295
shell: "cd /srv && docker compose up -d --build --force-recreate"

0 commit comments

Comments
 (0)