Monitor-only for individual containers (#652)

* Add monitor-only label

* Add tests for monitor-only

* Treat missing monitor-only label as if the option was set to false

* Add docs for container-based monitor-only

* Add function doc

* Fix monitor-only logic
This commit is contained in:
David H 2020-10-03 22:00:02 +02:00 committed by GitHub
parent 98b518612b
commit bde421be0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 147 additions and 10 deletions

View file

@ -162,7 +162,7 @@ Environment Variable: WATCHTOWER_LABEL_ENABLE
**Do not** update containers that have `com.centurylinklabs.watchtower.enable` label set to false and no `--label-enable` argument is passed. Note that only one or the other (targeting by enable label) can be used at the same time to target containers.
## Without updating containers
Will only monitor for new images, not update the containers.
Will only monitor for new images, send notifications and invoke the [pre-check/post-check hooks](https://containrrr.dev/watchtower/lifecycle-hooks/), but will **not** update the containers.
> ### ⚠️ Please note
>
@ -175,6 +175,8 @@ Environment Variable: WATCHTOWER_MONITOR_ONLY
Default: false
```
Note that monitor-only can also be specified on a per-container basis with the `com.centurylinklabs.watchtower.monitor-only` label set on those containers.
## Without restarting containers
Do not restart containers after updating. This option can be useful when the start of the containers
is managed by an external system such as systemd.