Skip to content

Instantly share code, notes, and snippets.

@scyto
Last active August 24, 2026 01:48
Show Gist options
  • Select an option

  • Save scyto/1091c492fa0c8353be4cbfa3874c7f54 to your computer and use it in GitHub Desktop.

Select an option

Save scyto/1091c492fa0c8353be4cbfa3874c7f54 to your computer and use it in GitHub Desktop.
use shepherd to update images

πŸ“– This guide has moved

The maintained version now lives at - APPRISE_SIDECAR_URL=apprise-microservice:5000, part of scyto/homelab-docs β€” searchable, cross-linked, and easier to keep current.

This gist stays put so the comments below remain readable β€” there is a lot of useful troubleshooting in them. For corrections, please open a PR or issue on the repo.


Update Swarm Images

i wanted to update swarm images whenever there is a new image available (even at the risk of breaking something)

it seems watchtower can't do this for swarm stacks/services - only one off containers.

I found this great container from https://github.com/djmaze/shepherd

placement considerations

Must be placed on a manager node.

Config notes

By default it will refresh all services, exclude any you dont want it to touch. I am not using apprise for this yet, but will be implementin apprise soon.

version: "3"
services:
  shepherd:
    build: .
    image: mazzolino/shepherd
    environment:
      - SLEEP_TIME=60m
      - IGNORELIST_SERVICES="shepherd_shepherd wordpress_db wordpress_wordpress"
      - ROLLBACK_ON_FAILURE=true
      - TZ=America/Los_Angeles
      - IMAGE_AUTOCLEAN_LIMIT=2
#      - APPRISE_SIDECAR_URL=apprise-microservice:5000      	
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    deploy:
      placement:
        constraints:
        - node.role == manager
@scyto

scyto commented Nov 12, 2024 via email

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment