update cronjob labels and add prune-anon-volumes service in docker-compose.yml
All checks were successful
Portainer Stack Update / update_stack (push) Successful in 22s

This commit is contained in:
krisz 2025-08-22 16:32:39 +02:00
parent c9ff1c8918
commit 30e1176fea

View File

@ -192,12 +192,25 @@ services:
cpus: '0.25' cpus: '0.25'
mode: global mode: global
labels: labels:
- swarm.cronjob.enable=true swarm.cronjob.enable: "true"
- swarm.cronjob.schedule=0 0 * * * * swarm.cronjob.schedule: "0 1 * * *"
- swarm.cronjob.skip-running=true swarm.cronjob.skip-running: "true"
restart_policy: restart_policy:
condition: none condition: none
prune-anon-volumes:
image: docker:27.3.1-alpine3.20
command: sh -c "docker volume ls -q -f dangling=true | grep -E '^[0-9a-f]{12,}$$' | xargs -r docker volume rm"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
deploy:
mode: global
labels:
swarm.cronjob.enable: "false"
swarm.cronjob.skip-running: "true"
swarm.cronjob.schedule: "0 4 * * *"
restart_policy:
condition: none
networks: networks: