mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-13 13:46:38 +01:00
Allow running periodic updates with enabled HTTP API (#916)
* Allow running periodic updates with enabled HTTP API * Add --http-api-periodic-polls to docs
This commit is contained in:
parent
e308521a95
commit
6b155a111a
6 changed files with 55 additions and 12 deletions
|
|
@ -255,6 +255,16 @@ Environment Variable: WATCHTOWER_HTTP_API_TOKEN
|
|||
Default: -
|
||||
```
|
||||
|
||||
## HTTP API periodic polls
|
||||
Keep running periodic updates if the HTTP API mode is enabled, otherwise the HTTP API would prevent periodic polls.
|
||||
|
||||
```
|
||||
Argument: --http-api-periodic-polls
|
||||
Environment Variable: WATCHTOWER_HTTP_API_PERIODIC_POLLS
|
||||
Type: Boolean
|
||||
Default: false
|
||||
```
|
||||
|
||||
## Filter by scope
|
||||
Update containers that have a `com.centurylinklabs.watchtower.scope` label set with the same value as the given argument.
|
||||
This enables [running multiple instances](https://containrrr.github.io/watchtower/running-multiple-instances).
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@ services:
|
|||
- 8080:8080
|
||||
```
|
||||
|
||||
By default, enabling this mode prevents periodic polls (i.e. what is specified using `--interval` or `--schedule`). To run periodic updates regardless, pass `--http-api-periodic-polls`.
|
||||
|
||||
Notice that there is an environment variable named WATCHTOWER_HTTP_API_TOKEN. To prevent external services from accidentally triggering image updates, all of the requests have to contain a "Token" field, valued as the token defined in WATCHTOWER_HTTP_API_TOKEN, in their headers. In this case, there is a port bind to the host machine, allowing to request localhost:8080 to reach Watchtower. The following `curl` command would trigger an image update:
|
||||
|
||||
```bash
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue