bluesky-social / pds

Bluesky PDS (Personal Data Server) container image, compose file, and documentation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Restrict Watchtower update to the containers specified in the compose file

Jacob2161 opened this issue · comments

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/

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/