From f10b4e3492f234d4aaea139741ec940b7fee97ad Mon Sep 17 00:00:00 2001 From: Lion - dapplion <35266934+dapplion@users.noreply.github.com> Date: Sun, 28 Feb 2021 19:29:18 +0100 Subject: [PATCH] Update HTTP API docs (#827) --- docs/http-api-mode.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/http-api-mode.md b/docs/http-api-mode.md index def90d5..5f5b19a 100644 --- a/docs/http-api-mode.md +++ b/docs/http-api-mode.md @@ -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 -``` \ No newline at end of file +curl -H "Authorization: Bearer mytoken" localhost:8080/v1/update +```