@ -4,7 +4,7 @@ Watchtower provides an HTTP API mode that enables an HTTP endpoint that can be r
---
---
To enable this mode, use the flag `--http-api`. For example, in a Docker Compose config file:
To enable this mode, use the flag `--http-api-update`. For example, in a Docker Compose config file:
```yaml
```yaml
version: '3'
version: '3'
@ -19,7 +19,7 @@ services:
image: containrrr/watchtower
image: containrrr/watchtower
volumes:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock
command: --debug --http-api
command: --debug --http-api-update
environment:
environment:
- WATCHTOWER_HTTP_API_TOKEN=mytoken
- WATCHTOWER_HTTP_API_TOKEN=mytoken
labels:
labels:
@ -31,5 +31,5 @@ services:
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:
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: