Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict Watchtower update to the containers specified in the compose file #49

Open
Jacob2161 opened this issue Feb 23, 2024 · 1 comment
Assignees

Comments

@Jacob2161
Copy link
Collaborator

Jacob2161 commented Feb 23, 2024

Watchtower is currently configured to update all containers on the host. But it should only update the containers specified in the compose file, since there may be unrelated containers on the host that would not be good to update automatically.

See: https://containrrr.dev/watchtower/container-selection/

@Jacob2161 Jacob2161 self-assigned this Feb 23, 2024
@Bossett
Copy link

Bossett commented Feb 23, 2024

A simple solution is adding:

labels:
      - "com.centurylinklabs.watchtower.enable=true"

to the pds and set WATCHTOWER_LABEL_ENABLE: true in the watchtower environment, but a 'proper' solution would be to use a scope - which is all bluesky containers having:

labels:
      - "com.centurylinklabs.watchtower.scope=bluesky-social" # (e.g)

in both your service definition AND in the watchtower definition. This will also cause other watchtower instances on the same host with the same scope to fail (I think this works even when they're defined independently - as long as they connect to the same docker.sock), so there will only be one bluesky updater. See https://containrrr.dev/watchtower/running-multiple-instances/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants