diff --git a/services/system/stack.yml b/services/system/stack.yml index 2f7f3e3..7016d12 100644 --- a/services/system/stack.yml +++ b/services/system/stack.yml @@ -26,3 +26,16 @@ services: - "swarm.cronjob.schedule=0 0 0 * * sun" restart_policy: 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