Update HTTP API docs (#827)

pull/839/head
Lion - dapplion 4 years ago committed by GitHub
parent 52e6e11395
commit f10b4e3492
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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
version: '3'
@ -19,7 +19,7 @@ services:
image: containrrr/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --debug --http-api
command: --debug --http-api-update
environment:
- WATCHTOWER_HTTP_API_TOKEN=mytoken
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:
```bash
curl -H "Token: mytoken" localhost:8080/v1/update
```
curl -H "Authorization: Bearer mytoken" localhost:8080/v1/update
```

Loading…
Cancel
Save