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/notifications/">
|
||||
|
||||
|
||||
<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">
|
||||
|
|
@ -67,12 +70,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">
|
||||
|
|
@ -101,7 +105,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>
|
||||
|
|
@ -152,12 +156,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
|
||||
|
|
@ -184,7 +189,7 @@
|
|||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href=".." title="Home" class="md-nav__link">
|
||||
<a href=".." class="md-nav__link">
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -196,7 +201,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>
|
||||
|
|
@ -208,7 +213,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>
|
||||
|
|
@ -220,7 +225,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>
|
||||
|
|
@ -245,7 +250,7 @@
|
|||
<span class="md-nav__icon md-icon"></span>
|
||||
</label>
|
||||
|
||||
<a href="./" title="Notifications" class="md-nav__link md-nav__link--active">
|
||||
<a href="./" class="md-nav__link md-nav__link--active">
|
||||
Notifications
|
||||
</a>
|
||||
|
||||
|
|
@ -330,7 +335,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>
|
||||
|
|
@ -342,7 +347,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>
|
||||
|
|
@ -354,7 +359,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>
|
||||
|
|
@ -366,7 +371,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>
|
||||
|
|
@ -378,7 +383,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>
|
||||
|
|
@ -390,7 +395,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>
|
||||
|
|
@ -402,7 +407,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>
|
||||
|
|
@ -414,7 +419,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>
|
||||
|
|
@ -550,66 +555,66 @@ The types of notifications to send are set by passing a comma-separated list of
|
|||
<li><code>--notification-email-subjecttag</code> (env. <code>WATCHTOWER_NOTIFICATION_EMAIL_SUBJECTTAG</code>): Prefix to include in the subject tag. Useful when running multiple watchtowers.</li>
|
||||
</ul>
|
||||
<p>Example:</p>
|
||||
<pre><code class="bash">docker run -d \
|
||||
--name watchtower \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-e WATCHTOWER_NOTIFICATIONS=email \
|
||||
-e WATCHTOWER_NOTIFICATION_EMAIL_FROM=fromaddress@gmail.com \
|
||||
-e WATCHTOWER_NOTIFICATION_EMAIL_TO=toaddress@gmail.com \
|
||||
-e WATCHTOWER_NOTIFICATION_EMAIL_SERVER=smtp.gmail.com \
|
||||
-e WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT=587 \
|
||||
-e WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER=fromaddress@gmail.com \
|
||||
-e WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD=app_password \
|
||||
-e WATCHTOWER_NOTIFICATION_EMAIL_DELAY=2 \
|
||||
<div class="codehilite"><pre><span></span><code>docker run -d <span class="se">\</span>
|
||||
--name watchtower <span class="se">\</span>
|
||||
-v /var/run/docker.sock:/var/run/docker.sock <span class="se">\</span>
|
||||
-e <span class="nv">WATCHTOWER_NOTIFICATIONS</span><span class="o">=</span>email <span class="se">\</span>
|
||||
-e <span class="nv">WATCHTOWER_NOTIFICATION_EMAIL_FROM</span><span class="o">=</span>fromaddress@gmail.com <span class="se">\</span>
|
||||
-e <span class="nv">WATCHTOWER_NOTIFICATION_EMAIL_TO</span><span class="o">=</span>toaddress@gmail.com <span class="se">\</span>
|
||||
-e <span class="nv">WATCHTOWER_NOTIFICATION_EMAIL_SERVER</span><span class="o">=</span>smtp.gmail.com <span class="se">\</span>
|
||||
-e <span class="nv">WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT</span><span class="o">=</span><span class="m">587</span> <span class="se">\ </span>
|
||||
-e <span class="nv">WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER</span><span class="o">=</span>fromaddress@gmail.com <span class="se">\</span>
|
||||
-e <span class="nv">WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD</span><span class="o">=</span>app_password <span class="se">\</span>
|
||||
-e <span class="nv">WATCHTOWER_NOTIFICATION_EMAIL_DELAY</span><span class="o">=</span><span class="m">2</span> <span class="se">\</span>
|
||||
containrrr/watchtower
|
||||
</code></pre>
|
||||
</code></pre></div>
|
||||
|
||||
<p>The previous example assumes, that you already have an SMTP server up and running you can connect to. If you don't or you want to bring up watchtower with your own simple SMTP relay the following <code>docker-compose.yml</code> might be a good start for you.</p>
|
||||
<p>The following example assumes, that your domain is called <code>your-domain.com</code> and that you are going to use a certificate valid for <code>smtp.your-domain.com</code>. This hostname has to be used as <code>WATCHTOWER_NOTIFICATION_EMAIL_SERVER</code> otherwise the TLS connection is going to fail with <code>Failed to send notification email</code> or <code>connect: connection refused</code>. We also have to add a network for this setup in order to add an alias to it. If you also want to enable DKIM or other features on the SMTP server, you will find more information at <a href="https://hub.docker.com/r/freinet/postfix-relay">freinet/postfix-relay</a>.</p>
|
||||
<p>Example including an SMTP relay:</p>
|
||||
<pre><code class="yaml">---
|
||||
version: "3.8"
|
||||
services:
|
||||
watchtower:
|
||||
image: containrrr/watchtower:latest
|
||||
container_name: watchtower
|
||||
environment:
|
||||
WATCHTOWER_MONITOR_ONLY: "true"
|
||||
WATCHTOWER_NOTIFICATIONS: email
|
||||
WATCHTOWER_NOTIFICATION_EMAIL_FROM: from-address@your-domain.com
|
||||
WATCHTOWER_NOTIFICATION_EMAIL_TO: to-address@your-domain.com
|
||||
# you have to use a network alias here, if you use your own certificate
|
||||
WATCHTOWER_NOTIFICATION_EMAIL_SERVER: smtp.your-domain.com
|
||||
WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT: 25
|
||||
WATCHTOWER_NOTIFICATION_EMAIL_DELAY: 2
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
networks:
|
||||
- watchtower
|
||||
depends_on:
|
||||
- postfix
|
||||
<div class="codehilite"><pre><span></span><code><span class="nn">---</span>
|
||||
<span class="nt">version</span><span class="p">:</span> <span class="s">"3.8"</span>
|
||||
<span class="nt">services</span><span class="p">:</span>
|
||||
<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:latest</span>
|
||||
<span class="nt">container_name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">watchtower</span>
|
||||
<span class="nt">environment</span><span class="p">:</span>
|
||||
<span class="nt">WATCHTOWER_MONITOR_ONLY</span><span class="p">:</span> <span class="s">"true"</span>
|
||||
<span class="nt">WATCHTOWER_NOTIFICATIONS</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">email</span>
|
||||
<span class="nt">WATCHTOWER_NOTIFICATION_EMAIL_FROM</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">from-address@your-domain.com</span>
|
||||
<span class="nt">WATCHTOWER_NOTIFICATION_EMAIL_TO</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">to-address@your-domain.com</span>
|
||||
<span class="c1"># you have to use a network alias here, if you use your own certificate</span>
|
||||
<span class="nt">WATCHTOWER_NOTIFICATION_EMAIL_SERVER</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">smtp.your-domain.com</span>
|
||||
<span class="nt">WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">25</span>
|
||||
<span class="nt">WATCHTOWER_NOTIFICATION_EMAIL_DELAY</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">2</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">networks</span><span class="p">:</span>
|
||||
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">watchtower</span>
|
||||
<span class="nt">depends_on</span><span class="p">:</span>
|
||||
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">postfix</span>
|
||||
|
||||
# SMTP needed to send out status emails
|
||||
postfix:
|
||||
image: freinet/postfix-relay:latest
|
||||
expose:
|
||||
- 25
|
||||
environment:
|
||||
MAILNAME: somename.your-domain.com
|
||||
TLS_KEY: "/etc/ssl/domains/your-domain.com/your-domain.com.key"
|
||||
TLS_CRT: "/etc/ssl/domains/your-domain.com/your-domain.com.crt"
|
||||
TLS_CA: "/etc/ssl/domains/your-domain.com/intermediate.crt"
|
||||
volumes:
|
||||
- /etc/ssl/domains/your-domain.com/:/etc/ssl/domains/your-domain.com/:ro
|
||||
networks:
|
||||
watchtower:
|
||||
# this alias is really important to make your certificate work
|
||||
aliases:
|
||||
- smtp.your-domain.com
|
||||
networks:
|
||||
watchtower:
|
||||
external: false
|
||||
</code></pre>
|
||||
<span class="c1"># SMTP needed to send out status emails</span>
|
||||
<span class="nt">postfix</span><span class="p">:</span>
|
||||
<span class="nt">image</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">freinet/postfix-relay:latest</span>
|
||||
<span class="nt">expose</span><span class="p">:</span>
|
||||
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">25</span>
|
||||
<span class="nt">environment</span><span class="p">:</span>
|
||||
<span class="nt">MAILNAME</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">somename.your-domain.com</span>
|
||||
<span class="nt">TLS_KEY</span><span class="p">:</span> <span class="s">"/etc/ssl/domains/your-domain.com/your-domain.com.key"</span>
|
||||
<span class="nt">TLS_CRT</span><span class="p">:</span> <span class="s">"/etc/ssl/domains/your-domain.com/your-domain.com.crt"</span>
|
||||
<span class="nt">TLS_CA</span><span class="p">:</span> <span class="s">"/etc/ssl/domains/your-domain.com/intermediate.crt"</span>
|
||||
<span class="nt">volumes</span><span class="p">:</span>
|
||||
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">/etc/ssl/domains/your-domain.com/:/etc/ssl/domains/your-domain.com/:ro</span>
|
||||
<span class="nt">networks</span><span class="p">:</span>
|
||||
<span class="nt">watchtower</span><span class="p">:</span>
|
||||
<span class="c1"># this alias is really important to make your certificate work</span>
|
||||
<span class="nt">aliases</span><span class="p">:</span>
|
||||
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">smtp.your-domain.com</span>
|
||||
<span class="nt">networks</span><span class="p">:</span>
|
||||
<span class="nt">watchtower</span><span class="p">:</span>
|
||||
<span class="nt">external</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">false</span>
|
||||
</code></pre></div>
|
||||
|
||||
<h3 id="slack">Slack<a class="headerlink" href="#slack" title="Permanent link">¶</a></h3>
|
||||
<p>If watchtower is monitoring the same Docker daemon under which the watchtower container itself is running (i.e. if you volume-mounted <em>/var/run/docker.sock</em> into the watchtower container) then it has the ability to update itself. If a new version of the <em>containrrr/watchtower</em> image is pushed to the Docker Hub, your watchtower will pull down the new image and restart itself automatically.</p>
|
||||
|
|
@ -623,42 +628,42 @@ networks:
|
|||
<li><code>--notification-slack-icon-url</code> (env. <code>WATCHTOWER_NOTIFICATION_SLACK_ICON_URL</code>): An icon image URL string to use in place of the default icon.</li>
|
||||
</ul>
|
||||
<p>Example:</p>
|
||||
<pre><code class="bash">docker run -d \
|
||||
--name watchtower \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-e WATCHTOWER_NOTIFICATIONS=slack \
|
||||
-e WATCHTOWER_NOTIFICATION_SLACK_HOOK_URL="https://hooks.slack.com/services/xxx/yyyyyyyyyyyyyyy" \
|
||||
-e WATCHTOWER_NOTIFICATION_SLACK_IDENTIFIER=watchtower-server-1 \
|
||||
-e WATCHTOWER_NOTIFICATION_SLACK_CHANNEL=#my-custom-channel \
|
||||
-e WATCHTOWER_NOTIFICATION_SLACK_ICON_EMOJI=:whale: \
|
||||
-e WATCHTOWER_NOTIFICATION_SLACK_ICON_URL=<icon url> \
|
||||
<div class="codehilite"><pre><span></span><code>docker run -d <span class="se">\</span>
|
||||
--name watchtower <span class="se">\</span>
|
||||
-v /var/run/docker.sock:/var/run/docker.sock <span class="se">\</span>
|
||||
-e <span class="nv">WATCHTOWER_NOTIFICATIONS</span><span class="o">=</span>slack <span class="se">\</span>
|
||||
-e <span class="nv">WATCHTOWER_NOTIFICATION_SLACK_HOOK_URL</span><span class="o">=</span><span class="s2">"https://hooks.slack.com/services/xxx/yyyyyyyyyyyyyyy"</span> <span class="se">\</span>
|
||||
-e <span class="nv">WATCHTOWER_NOTIFICATION_SLACK_IDENTIFIER</span><span class="o">=</span>watchtower-server-1 <span class="se">\</span>
|
||||
-e <span class="nv">WATCHTOWER_NOTIFICATION_SLACK_CHANNEL</span><span class="o">=</span><span class="c1">#my-custom-channel \</span>
|
||||
-e <span class="nv">WATCHTOWER_NOTIFICATION_SLACK_ICON_EMOJI</span><span class="o">=</span>:whale: <span class="se">\</span>
|
||||
-e <span class="nv">WATCHTOWER_NOTIFICATION_SLACK_ICON_URL</span><span class="o">=</span><icon url> <span class="se">\</span>
|
||||
containrrr/watchtower
|
||||
</code></pre>
|
||||
</code></pre></div>
|
||||
|
||||
<h3 id="microsoft_teams">Microsoft Teams<a class="headerlink" href="#microsoft_teams" title="Permanent link">¶</a></h3>
|
||||
<p>To receive notifications in MSTeams channel, add <code>msteams</code> to the <code>--notifications</code> option or the <code>WATCHTOWER_NOTIFICATIONS</code> environment variable.</p>
|
||||
<p>Additionally, you should set the MSTeams webhook URL using the <code>--notification-msteams-hook</code> option or the <code>WATCHTOWER_NOTIFICATION_MSTEAMS_HOOK_URL</code> environment variable. This option can also reference a file, in which case the contents of the file are used.</p>
|
||||
<p>MSTeams notifier could send keys/values filled by <code>log.WithField</code> or <code>log.WithFields</code> as MSTeams message facts. To enable this feature add <code>--notification-msteams-data</code> flag or set <code>WATCHTOWER_NOTIFICATION_MSTEAMS_USE_LOG_DATA=true</code> environment variable.</p>
|
||||
<p>Example:</p>
|
||||
<pre><code class="bash">docker run -d \
|
||||
--name watchtower \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-e WATCHTOWER_NOTIFICATIONS=msteams \
|
||||
-e WATCHTOWER_NOTIFICATION_MSTEAMS_HOOK_URL="https://outlook.office.com/webhook/xxxxxxxx@xxxxxxx/IncomingWebhook/yyyyyyyy/zzzzzzzzzz" \
|
||||
-e WATCHTOWER_NOTIFICATION_MSTEAMS_USE_LOG_DATA=true \
|
||||
<div class="codehilite"><pre><span></span><code>docker run -d <span class="se">\</span>
|
||||
--name watchtower <span class="se">\</span>
|
||||
-v /var/run/docker.sock:/var/run/docker.sock <span class="se">\</span>
|
||||
-e <span class="nv">WATCHTOWER_NOTIFICATIONS</span><span class="o">=</span>msteams <span class="se">\</span>
|
||||
-e <span class="nv">WATCHTOWER_NOTIFICATION_MSTEAMS_HOOK_URL</span><span class="o">=</span><span class="s2">"https://outlook.office.com/webhook/xxxxxxxx@xxxxxxx/IncomingWebhook/yyyyyyyy/zzzzzzzzzz"</span> <span class="se">\</span>
|
||||
-e <span class="nv">WATCHTOWER_NOTIFICATION_MSTEAMS_USE_LOG_DATA</span><span class="o">=</span><span class="nb">true</span> <span class="se">\</span>
|
||||
containrrr/watchtower
|
||||
</code></pre>
|
||||
</code></pre></div>
|
||||
|
||||
<h3 id="gotify">Gotify<a class="headerlink" href="#gotify" title="Permanent link">¶</a></h3>
|
||||
<p>To push a notification to your Gotify instance, register a Gotify app and specify the Gotify URL and app token:</p>
|
||||
<pre><code class="bash">docker run -d \
|
||||
--name watchtower \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-e WATCHTOWER_NOTIFICATIONS=gotify \
|
||||
-e WATCHTOWER_NOTIFICATION_GOTIFY_URL="https://my.gotify.tld/" \
|
||||
-e WATCHTOWER_NOTIFICATION_GOTIFY_TOKEN="SuperSecretToken" \
|
||||
<div class="codehilite"><pre><span></span><code>docker run -d <span class="se">\</span>
|
||||
--name watchtower <span class="se">\</span>
|
||||
-v /var/run/docker.sock:/var/run/docker.sock <span class="se">\</span>
|
||||
-e <span class="nv">WATCHTOWER_NOTIFICATIONS</span><span class="o">=</span>gotify <span class="se">\</span>
|
||||
-e <span class="nv">WATCHTOWER_NOTIFICATION_GOTIFY_URL</span><span class="o">=</span><span class="s2">"https://my.gotify.tld/"</span> <span class="se">\</span>
|
||||
-e <span class="nv">WATCHTOWER_NOTIFICATION_GOTIFY_TOKEN</span><span class="o">=</span><span class="s2">"SuperSecretToken"</span> <span class="se">\</span>
|
||||
containrrr/watchtower
|
||||
</code></pre>
|
||||
</code></pre></div>
|
||||
|
||||
<p><code>-e WATCHTOWER_NOTIFICATION_GOTIFY_TOKEN</code> or <code>--notification-gotify-token</code> can also reference a file, in which case the contents of the file are used.</p>
|
||||
<p>If you want to disable TLS verification for the Gotify instance, you can use either <code>-e WATCHTOWER_NOTIFICATION_GOTIFY_TLS_SKIP_VERIFY=true</code> or <code>--notification-gotify-tls-skip-verify</code>. </p>
|
||||
|
|
@ -676,14 +681,14 @@ You can define multiple services by space separating the URLs. (See example belo
|
|||
<p>The template is a Go <a href="https://golang.org/pkg/text/template/">template</a> and the you format a list of <a href="https://pkg.go.dev/github.com/sirupsen/logrus?tab=doc#Entry">log entries</a>.</p>
|
||||
<p>The default value if not set is <code>{{range .}}{{.Message}}{{println}}{{end}}</code>. The example below uses a template that also outputs timestamp and log level.</p>
|
||||
<p>Example:</p>
|
||||
<pre><code class="bash">docker run -d \
|
||||
--name watchtower \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-e WATCHTOWER_NOTIFICATIONS=shoutrrr \
|
||||
-e WATCHTOWER_NOTIFICATION_URL="discord://token@channel slack://watchtower@token-a/token-b/token-c" \
|
||||
-e WATCHTOWER_NOTIFICATION_TEMPLATE="{{range .}}{{.Time.Format \"2006-01-02 15:04:05\"}} ({{.Level}}): {{.Message}}{{println}}{{end}}" \
|
||||
<div class="codehilite"><pre><span></span><code>docker run -d <span class="se">\</span>
|
||||
--name watchtower <span class="se">\</span>
|
||||
-v /var/run/docker.sock:/var/run/docker.sock <span class="se">\</span>
|
||||
-e <span class="nv">WATCHTOWER_NOTIFICATIONS</span><span class="o">=</span>shoutrrr <span class="se">\</span>
|
||||
-e <span class="nv">WATCHTOWER_NOTIFICATION_URL</span><span class="o">=</span><span class="s2">"discord://token@channel slack://watchtower@token-a/token-b/token-c"</span> <span class="se">\</span>
|
||||
-e <span class="nv">WATCHTOWER_NOTIFICATION_TEMPLATE</span><span class="o">=</span><span class="s2">"{{range .}}{{.Time.Format \"2006-01-02 15:04:05\"}} ({{.Level}}): {{.Message}}{{println}}{{end}}"</span> <span class="se">\</span>
|
||||
containrrr/watchtower
|
||||
</code></pre>
|
||||
</code></pre></div>
|
||||
|
||||
|
||||
|
||||
|
|
@ -702,7 +707,7 @@ You can define multiple services by space separating the URLs. (See example belo
|
|||
<div class="md-footer-nav">
|
||||
<nav class="md-footer-nav__inner md-grid" aria-label="Footer">
|
||||
|
||||
<a href="../arguments/" title="Arguments" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev">
|
||||
<a href="../arguments/" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev">
|
||||
<div class="md-footer-nav__button md-icon">
|
||||
<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>
|
||||
</div>
|
||||
|
|
@ -717,7 +722,7 @@ You can define multiple services by space separating the URLs. (See example belo
|
|||
</a>
|
||||
|
||||
|
||||
<a href="../container-selection/" title="Container selection" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
|
||||
<a href="../container-selection/" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
|
||||
<div class="md-footer-nav__title">
|
||||
<div class="md-ellipsis">
|
||||
<span class="md-footer-nav__direction">
|
||||
|
|
@ -750,8 +755,8 @@ You can define multiple services by space separating the URLs. (See example belo
|
|||
|
||||
</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