Refactor swarm/core.yml to add shepherd service for managing containers

This commit is contained in:
2024-06-06 20:37:28 +08:00
parent 6c4de20629
commit 3cf60db048
3 changed files with 86 additions and 0 deletions
+20
View File
@@ -123,6 +123,26 @@ services:
# Use the public network created to be shared between Traefik and
# any other service that needs to be publicly available with HTTPS
- traefik-public
shepherd:
image: containrrr/shepherd
environment:
# Beware YAML gotchas regarding quoting:
# With KEY: 'VALUE', quotes are part of yaml syntax and thus get stripped
# but with KEY='VALUE', they are part of the value and stay there,
# causing problems!
TZ: 'Asia/Singapore'
SLEEP_TIME: '60m'
FILTER_SERVICES: ''
VERBOSE: 'true'
UPDATE_OPTIONS: '--update-delay=30s'
ROLLBACK_OPTIONS: '--rollback-delay=0s'
IMAGE_AUTOCLEAN_LIMIT: '5'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
deploy:
placement:
constraints:
- node.role == manager
volumes:
# Create a volume to store the certificates, there is a constraint to make sure