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

Decrease watchtower Polling Interval and Add Orphaned Image Cleanup #49

Conversation

ThorntonMatthewD
Copy link
Collaborator

Summary

Adds the following environmental variables to the watchtower service:

Env Var Description Value
WATCHTOWER_POLL_INTERVAL The number of seconds between when watchtower will look for new images. 900 (15 minutes)
WATCHTOWER_CLEANUP Determines whether or not old images should be removed after they have been updated. true

Copy link
Member

@oliviasculley oliviasculley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Docker's free/anonymous pull limit is 100 pulls / 6 hours, but this is well under that, and you can log in with a docker account for 200 pulls / 6 hours as well.

@ThorntonMatthewD
Copy link
Collaborator Author

@oliviasculley I did not know that! I think we'll be running at ~72 pulls/6 hours currently for just the Slack bot setup. I wonder if we should exclude autoheal and watchtower from being polled.

I didn't see any other containers running in the screenshot that Jim posted earlier in the channel, but do you know if there are others? I think watchtower will look for updates for anything running on the same daemon.

Copy link
Member

@allella allella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ThorntonMatthewD @oliviasculley

With this docker-compose.yml being an example of what the file should look like, are we missing some values in this example that exist in production environment.

For example, the production slack-events bot looks like this, with more than two environment values set in that section.

      - BOT_TOKEN=value
      - SIGNING_SECRET=value
      - PORT=7331
      - TZ=US/Eastern
      # Poll for image updates every 15 minutes
      - WATCHTOWER_POLL_INTERVAL=900
      # Cleans up orphaned images upon pulling new ones
      - WATCHTOWER_CLEANUP=true

Copy link
Member

@allella allella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, the GitHub collapsing of the file was confusing me and thinking the "environment" change was part of the environment in the slack-events-bot section.

@ThorntonMatthewD ThorntonMatthewD merged commit f919444 into hackgvl:dev Nov 21, 2023
1 check passed
@ThorntonMatthewD ThorntonMatthewD deleted the lower-watchtower-polling-interval branch November 21, 2023 04:20
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 this pull request may close these issues.

3 participants