system: Add volume cleanup job

This commit is contained in:
Kacper Donat 2022-11-11 11:40:10 +01:00
parent 38744325b7
commit fc23489d84

View File

@ -26,3 +26,16 @@ services:
- "swarm.cronjob.schedule=0 0 0 * * sun" - "swarm.cronjob.schedule=0 0 0 * * sun"
restart_policy: restart_policy:
condition: none condition: none
volume-cleanup-job:
image: docker
command: ["docker", "volume", "prune", "-f"]
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
deploy:
mode: global
labels:
- "swarm.cronjob.enable=true"
- "swarm.cronjob.schedule=0 0 0 * * *"
restart_policy:
condition: none