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 · May be fixed by #124
Open

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

Jacob2161 opened this issue Feb 23, 2024 · 1 comment · May be fixed by #124
Assignees

Comments

@Jacob2161
Copy link
Contributor

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/

rothgar added a commit to rothgar/pds that referenced this issue Nov 4, 2024
fixes bluesky-social#49

By not using oneshot service type and not detaching the docker compose
command you can use normal systemd tools (e.g. journalctl) for logs.
Docker commands still work too.

Signed-off-by: Justin Garrison <[email protected]>
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

Successfully merging a pull request may close this issue.

2 participants