Skip to content

Commit

Permalink
Update HTTP API docs (#827)
Browse files Browse the repository at this point in the history
  • Loading branch information
dapplion authored Feb 28, 2021
1 parent 52e6e11 commit f10b4e3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/http-api-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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:
Expand All @@ -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
```

0 comments on commit f10b4e3

Please sign in to comment.