mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-16 15:10:12 +01:00
Deployed 9b998fb with MkDocs version: 1.1.2
This commit is contained in:
parent
53c402703e
commit
1731302145
36 changed files with 978 additions and 899 deletions
|
|
@ -7,11 +7,12 @@
|
|||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://containrrr.github.io/watchtower/http-api-mode/">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="../assets/images/favicon.png">
|
||||
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.0.1">
|
||||
<link rel="shortcut icon" href="../images/favicon.ico">
|
||||
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.1.7">
|
||||
|
||||
|
||||
|
||||
|
|
@ -19,10 +20,10 @@
|
|||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../assets/stylesheets/main.38780c08.min.css">
|
||||
<link rel="stylesheet" href="../assets/stylesheets/main.19753c6b.min.css">
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../assets/stylesheets/palette.3f72e892.min.css">
|
||||
<link rel="stylesheet" href="../assets/stylesheets/palette.196e0c26.min.css">
|
||||
|
||||
|
||||
|
||||
|
|
@ -37,6 +38,8 @@
|
|||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../stylesheets/theme.css">
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -49,7 +52,7 @@
|
|||
|
||||
|
||||
|
||||
<body dir="ltr" data-md-color-scheme="" data-md-color-primary="none" data-md-color-accent="none">
|
||||
<body dir="ltr" data-md-color-scheme="containrrr" data-md-color-primary="" data-md-color-accent="">
|
||||
|
||||
|
||||
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
|
||||
|
|
@ -62,12 +65,13 @@
|
|||
|
||||
</div>
|
||||
|
||||
<header class="md-header" data-md-component="header">
|
||||
|
||||
|
||||
<header class="md-header" data-md-component="header">
|
||||
<nav class="md-header-nav md-grid" aria-label="Header">
|
||||
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower">
|
||||
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
|
||||
<img src="../images/logo-450px.png" alt="logo">
|
||||
|
||||
</a>
|
||||
<label class="md-header-nav__button md-icon" for="__drawer">
|
||||
|
|
@ -96,7 +100,7 @@
|
|||
<label class="md-search__overlay" for="__search"></label>
|
||||
<div class="md-search__inner" role="search">
|
||||
<form class="md-search__form" name="search">
|
||||
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active">
|
||||
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
|
||||
<label class="md-search__icon md-icon" for="__search">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
|
||||
|
|
@ -147,12 +151,13 @@
|
|||
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
|
||||
<div class="md-sidebar__scrollwrap">
|
||||
<div class="md-sidebar__inner">
|
||||
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
|
||||
|
||||
|
||||
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
|
||||
<label class="md-nav__title" for="__drawer">
|
||||
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower">
|
||||
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
|
||||
<img src="../images/logo-450px.png" alt="logo">
|
||||
|
||||
</a>
|
||||
Watchtower
|
||||
|
|
@ -179,7 +184,7 @@
|
|||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href=".." title="Home" class="md-nav__link">
|
||||
<a href=".." class="md-nav__link">
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -191,7 +196,7 @@
|
|||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../introduction/" title="Introduction" class="md-nav__link">
|
||||
<a href="../introduction/" class="md-nav__link">
|
||||
Introduction
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -203,7 +208,7 @@
|
|||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../usage-overview/" title="Usage overview" class="md-nav__link">
|
||||
<a href="../usage-overview/" class="md-nav__link">
|
||||
Usage overview
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -215,7 +220,7 @@
|
|||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../arguments/" title="Arguments" class="md-nav__link">
|
||||
<a href="../arguments/" class="md-nav__link">
|
||||
Arguments
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -227,7 +232,7 @@
|
|||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../notifications/" title="Notifications" class="md-nav__link">
|
||||
<a href="../notifications/" class="md-nav__link">
|
||||
Notifications
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -239,7 +244,7 @@
|
|||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../container-selection/" title="Container selection" class="md-nav__link">
|
||||
<a href="../container-selection/" class="md-nav__link">
|
||||
Container selection
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -251,7 +256,7 @@
|
|||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../private-registries/" title="Private registries" class="md-nav__link">
|
||||
<a href="../private-registries/" class="md-nav__link">
|
||||
Private registries
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -263,7 +268,7 @@
|
|||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../linked-containers/" title="Linked containers" class="md-nav__link">
|
||||
<a href="../linked-containers/" class="md-nav__link">
|
||||
Linked containers
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -275,7 +280,7 @@
|
|||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../remote-hosts/" title="Remote hosts" class="md-nav__link">
|
||||
<a href="../remote-hosts/" class="md-nav__link">
|
||||
Remote hosts
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -287,7 +292,7 @@
|
|||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../secure-connections/" title="Secure connections" class="md-nav__link">
|
||||
<a href="../secure-connections/" class="md-nav__link">
|
||||
Secure connections
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -299,7 +304,7 @@
|
|||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../stop-signals/" title="Stop signals" class="md-nav__link">
|
||||
<a href="../stop-signals/" class="md-nav__link">
|
||||
Stop signals
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -311,7 +316,7 @@
|
|||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../lifecycle-hooks/" title="Lifecycle hooks" class="md-nav__link">
|
||||
<a href="../lifecycle-hooks/" class="md-nav__link">
|
||||
Lifecycle hooks
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -323,7 +328,7 @@
|
|||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../running-multiple-instances/" title="Running multiple instances" class="md-nav__link">
|
||||
<a href="../running-multiple-instances/" class="md-nav__link">
|
||||
Running multiple instances
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -354,30 +359,30 @@
|
|||
</ul>
|
||||
<hr />
|
||||
<p>To enable this mode, use the flag <code>--http-api</code>. For example, in a Docker Compose config file:</p>
|
||||
<pre><code class="json">version: '3'
|
||||
<div class="codehilite"><pre><span></span><code><span class="nt">version</span><span class="p">:</span> <span class="s">'3'</span>
|
||||
|
||||
services:
|
||||
app-monitored-by-watchtower:
|
||||
image: myapps/monitored-by-watchtower
|
||||
labels:
|
||||
- "com.centurylinklabs.watchtower.enable=true"
|
||||
<span class="nt">services</span><span class="p">:</span>
|
||||
<span class="nt">app-monitored-by-watchtower</span><span class="p">:</span>
|
||||
<span class="nt">image</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">myapps/monitored-by-watchtower</span>
|
||||
<span class="nt">labels</span><span class="p">:</span>
|
||||
<span class="p p-Indicator">-</span> <span class="s">"com.centurylinklabs.watchtower.enable=true"</span>
|
||||
|
||||
watchtower:
|
||||
image: containrrr/watchtower
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
command: --debug --http-api
|
||||
environment:
|
||||
- WATCHTOWER_HTTP_API_TOKEN=mytoken
|
||||
labels:
|
||||
- "com.centurylinklabs.watchtower.enable=false"
|
||||
ports:
|
||||
- 8080:8080
|
||||
</code></pre>
|
||||
<span class="nt">watchtower</span><span class="p">:</span>
|
||||
<span class="nt">image</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">containrrr/watchtower</span>
|
||||
<span class="nt">volumes</span><span class="p">:</span>
|
||||
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">/var/run/docker.sock:/var/run/docker.sock</span>
|
||||
<span class="nt">command</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">--debug --http-api</span>
|
||||
<span class="nt">environment</span><span class="p">:</span>
|
||||
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">WATCHTOWER_HTTP_API_TOKEN=mytoken</span>
|
||||
<span class="nt">labels</span><span class="p">:</span>
|
||||
<span class="p p-Indicator">-</span> <span class="s">"com.centurylinklabs.watchtower.enable=false"</span>
|
||||
<span class="nt">ports</span><span class="p">:</span>
|
||||
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">8080:8080</span>
|
||||
</code></pre></div>
|
||||
|
||||
<p>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 <code>curl</code> command would trigger an image update:</p>
|
||||
<pre><code class="bash">curl -H "Token: mytoken" localhost:8080/v1/update
|
||||
</code></pre>
|
||||
<div class="codehilite"><pre><span></span><code>curl -H <span class="s2">"Token: mytoken"</span> localhost:8080/v1/update
|
||||
</code></pre></div>
|
||||
|
||||
|
||||
|
||||
|
|
@ -409,8 +414,8 @@ services:
|
|||
|
||||
</div>
|
||||
|
||||
<script src="../assets/javascripts/vendor.77e55a48.min.js"></script>
|
||||
<script src="../assets/javascripts/bundle.aa3f9871.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script>
|
||||
<script src="../assets/javascripts/vendor.0ac82a11.min.js"></script>
|
||||
<script src="../assets/javascripts/bundle.f81dfb4d.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script>
|
||||
|
||||
<script>
|
||||
app = initialize({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue