mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-16 15:10:12 +01:00
Deployed 70ca4c2 with MkDocs version: 1.2.3
This commit is contained in:
parent
670ba26f36
commit
383f9ef9cb
39 changed files with 8444 additions and 1087 deletions
|
|
@ -8,11 +8,10 @@
|
|||
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="https://containrrr.dev/watchtower/notifications/">
|
||||
|
||||
<link rel="icon" href="../images/favicon.ico">
|
||||
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-7.1.3">
|
||||
<meta name="generator" content="mkdocs-1.2.3, mkdocs-material-8.1.11">
|
||||
|
||||
|
||||
|
||||
|
|
@ -20,10 +19,10 @@
|
|||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../assets/stylesheets/main.e35208c4.min.css">
|
||||
<link rel="stylesheet" href="../assets/stylesheets/main.50e68009.min.css">
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../assets/stylesheets/palette.ef6f36e2.min.css">
|
||||
<link rel="stylesheet" href="../assets/stylesheets/palette.e6a45f82.min.css">
|
||||
|
||||
|
||||
|
||||
|
|
@ -33,15 +32,16 @@
|
|||
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono&display=fallback">
|
||||
<style>:root{--md-text-font-family:"Roboto";--md-code-font-family:"Roboto Mono"}</style>
|
||||
<style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../stylesheets/theme.css">
|
||||
|
||||
<script>__md_scope=new URL("..",location),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
|
@ -55,7 +55,6 @@
|
|||
<body dir="ltr" data-md-color-scheme="containrrr" data-md-color-primary="" data-md-color-accent="">
|
||||
|
||||
|
||||
<script>function __prefix(e){return new URL("..",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script>
|
||||
|
||||
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
|
||||
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
|
||||
|
|
@ -72,7 +71,10 @@
|
|||
|
||||
</div>
|
||||
|
||||
<header class="md-header" data-md-component="header">
|
||||
|
||||
|
||||
|
||||
<header class="md-header" data-md-component="header">
|
||||
<nav class="md-header__inner md-grid" aria-label="Header">
|
||||
<a href=".." title="Watchtower" class="md-header__button md-logo" aria-label="Watchtower" data-md-component="logo">
|
||||
|
||||
|
|
@ -104,19 +106,22 @@
|
|||
<label class="md-header__button 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 0 1 16 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 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
|
||||
</label>
|
||||
|
||||
<div class="md-search" data-md-component="search" role="dialog">
|
||||
<div class="md-search" data-md-component="search" role="dialog">
|
||||
<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" required>
|
||||
<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" 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 0 1 16 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 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.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>
|
||||
</label>
|
||||
<button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
|
||||
</button>
|
||||
<nav class="md-search__options" aria-label="Search">
|
||||
|
||||
<button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
|
||||
</button>
|
||||
</nav>
|
||||
|
||||
</form>
|
||||
<div class="md-search__output">
|
||||
<div class="md-search__scrollwrap" data-md-scrollfix>
|
||||
|
|
@ -133,11 +138,10 @@
|
|||
|
||||
|
||||
<div class="md-header__source">
|
||||
|
||||
<a href="https://github.com/containrrr/watchtower/" title="Go to repository" class="md-source" data-md-component="source">
|
||||
<a href="https://github.com/containrrr/watchtower/" title="Go to repository" class="md-source" data-md-component="source">
|
||||
<div class="md-source__icon md-icon">
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
|
||||
</div>
|
||||
<div class="md-source__repository">
|
||||
GitHub
|
||||
|
|
@ -146,12 +150,15 @@
|
|||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
|
||||
<div class="md-container" data-md-component="container">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<main class="md-main" data-md-component="main">
|
||||
<div class="md-main__inner md-grid">
|
||||
|
|
@ -175,11 +182,10 @@
|
|||
</label>
|
||||
|
||||
<div class="md-nav__source">
|
||||
|
||||
<a href="https://github.com/containrrr/watchtower/" title="Go to repository" class="md-source" data-md-component="source">
|
||||
<a href="https://github.com/containrrr/watchtower/" title="Go to repository" class="md-source" data-md-component="source">
|
||||
<div class="md-source__icon md-icon">
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
|
||||
</div>
|
||||
<div class="md-source__repository">
|
||||
GitHub
|
||||
|
|
@ -276,6 +282,7 @@
|
|||
</a>
|
||||
|
||||
|
||||
|
||||
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
|
||||
|
||||
|
||||
|
|
@ -499,6 +506,7 @@
|
|||
<div class="md-sidebar__scrollwrap">
|
||||
<div class="md-sidebar__inner">
|
||||
|
||||
|
||||
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
|
||||
|
||||
|
||||
|
|
@ -579,12 +587,12 @@
|
|||
<article class="md-content__inner md-typeset">
|
||||
|
||||
|
||||
<a href="https://github.com/containrrr/watchtower/edit/main/docs/notifications.md" title="Edit this page" class="md-content__button md-icon">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg>
|
||||
</a>
|
||||
|
||||
|
||||
<h1 id="notifications">Notifications<a class="headerlink" href="#notifications" title="Permanent link">¶</a></h1>
|
||||
<a href="https://github.com/containrrr/watchtower/edit/main/docs/notifications.md" title="Edit this page" class="md-content__button md-icon">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg>
|
||||
</a>
|
||||
|
||||
|
||||
<h1 id="notifications">Notifications<a class="headerlink" href="#notifications" title="Permanent link">¶</a></h1>
|
||||
<p>Watchtower can send notifications when containers are updated. Notifications are sent via hooks in the logging
|
||||
system, <a href="http://github.com/sirupsen/logrus">logrus</a>. The types of notifications to send are set by passing a
|
||||
comma-separated list of values to the <code>--notifications</code> option
|
||||
|
|
@ -598,7 +606,7 @@ comma-separated list of values to the <code>--notifications</code> option
|
|||
</ul>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Using multiple notifications with environment variables</p>
|
||||
<p>There is currently a bug in Viper (<a class="magiclink magiclink-github magiclink-issue" href="https://github.com/spf13/viper/issues/380" title="GitHub Issue: spf13/viper#380">spf13/viper#380</a>), which prevents comma-separated slices to
|
||||
<p>There is currently a bug in Viper (<a class="magiclink magiclink-github magiclink-issue" href="https://github.com/spf13/viper/issues/380" title="GitHub Issue: spf13/viper #380">spf13/viper#380</a>), which prevents comma-separated slices to
|
||||
be used when using the environment variable.<br />
|
||||
A workaround is available where we instead put quotes around the environment variable value and replace the commas with
|
||||
spaces:
|
||||
|
|
@ -610,6 +618,7 @@ quotes (<code>"</code>). This prevents unexpected errors when watchtower starts.
|
|||
<h2 id="settings">Settings<a class="headerlink" href="#settings" title="Permanent link">¶</a></h2>
|
||||
<ul>
|
||||
<li><code>--notifications-level</code> (env. <code>WATCHTOWER_NOTIFICATIONS_LEVEL</code>): Controls the log level which is used for the notifications. If omitted, the default log level is <code>info</code>. Possible values are: <code>panic</code>, <code>fatal</code>, <code>error</code>, <code>warn</code>, <code>info</code>, <code>debug</code> or <code>trace</code>.</li>
|
||||
<li><code>--notifications-hostname</code> (env. <code>WATCHTOWER_NOTIFICATIONS_HOSTNAME</code>): Custom hostname specified in subject/title. Useful to override the operating system hostname.</li>
|
||||
<li>Watchtower will post a notification every time it is started. This behavior <a href="https://containrrr.github.io/watchtower/arguments/#without_sending_a_startup_message">can be changed</a> with an argument.</li>
|
||||
</ul>
|
||||
<h2 id="available_services">Available services<a class="headerlink" href="#available_services" title="Permanent link">¶</a></h2>
|
||||
|
|
@ -643,50 +652,49 @@ quotes (<code>"</code>). This prevents unexpected errors when watchtower starts.
|
|||
<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>
|
||||
<div class="highlight"><pre><span></span><code><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>
|
||||
<div class="highlight"><pre><span></span><code><span class="nt">version</span><span class="p">:</span><span class="w"> </span><span class="s">'3.8'</span><span class="w"></span>
|
||||
<span class="nt">services</span><span class="p">:</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">watchtower</span><span class="p">:</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">containrrr/watchtower:latest</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">container_name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">watchtower</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">environment</span><span class="p">:</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">WATCHTOWER_MONITOR_ONLY</span><span class="p">:</span><span class="w"> </span><span class="s">'true'</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">WATCHTOWER_NOTIFICATIONS</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">email</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">WATCHTOWER_NOTIFICATION_EMAIL_FROM</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">from-address@your-domain.com</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">WATCHTOWER_NOTIFICATION_EMAIL_TO</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">to-address@your-domain.com</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="c1"># you have to use a network alias here, if you use your own certificate</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">WATCHTOWER_NOTIFICATION_EMAIL_SERVER</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">smtp.your-domain.com</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">25</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">WATCHTOWER_NOTIFICATION_EMAIL_DELAY</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">2</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">volumes</span><span class="p">:</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/var/run/docker.sock:/var/run/docker.sock</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">networks</span><span class="p">:</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">watchtower</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">depends_on</span><span class="p">:</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">postfix</span><span class="w"></span>
|
||||
|
||||
<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>
|
||||
<span class="w"> </span><span class="c1"># SMTP needed to send out status emails</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">postfix</span><span class="p">:</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">freinet/postfix-relay:latest</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">expose</span><span class="p">:</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">25</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">environment</span><span class="p">:</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">MAILNAME</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">somename.your-domain.com</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">TLS_KEY</span><span class="p">:</span><span class="w"> </span><span class="s">'/etc/ssl/domains/your-domain.com/your-domain.com.key'</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">TLS_CRT</span><span class="p">:</span><span class="w"> </span><span class="s">'/etc/ssl/domains/your-domain.com/your-domain.com.crt'</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">TLS_CA</span><span class="p">:</span><span class="w"> </span><span class="s">'/etc/ssl/domains/your-domain.com/intermediate.crt'</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">volumes</span><span class="p">:</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </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="w"></span>
|
||||
<span class="w"> </span><span class="nt">networks</span><span class="p">:</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">watchtower</span><span class="p">:</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="c1"># this alias is really important to make your certificate work</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">aliases</span><span class="p">:</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">smtp.your-domain.com</span><span class="w"></span>
|
||||
<span class="nt">networks</span><span class="p">:</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">watchtower</span><span class="p">:</span><span class="w"></span>
|
||||
<span class="w"> </span><span class="nt">external</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span><span class="w"></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>
|
||||
<p>To receive notifications in Slack, add <code>slack</code> to the <code>--notifications</code> option or the <code>WATCHTOWER_NOTIFICATIONS</code> environment variable.</p>
|
||||
<p>Additionally, you should set the Slack webhook URL using the <code>--notification-slack-hook-url</code> option or the <code>WATCHTOWER_NOTIFICATION_SLACK_HOOK_URL</code> environment variable. This option can also reference a file, in which case the contents of the file are used.</p>
|
||||
<p>By default, watchtower will send messages under the name <code>watchtower</code>, you can customize this string through the <code>--notification-slack-identifier</code> option or the <code>WATCHTOWER_NOTIFICATION_SLACK_IDENTIFIER</code> environment variable.</p>
|
||||
|
|
@ -734,7 +742,7 @@ quotes (<code>"</code>). This prevents unexpected errors when watchtower starts.
|
|||
<ul>
|
||||
<li><code>--notification-url</code> (env. <code>WATCHTOWER_NOTIFICATION_URL</code>): The shoutrrr service URL to be used.</li>
|
||||
</ul>
|
||||
<p>Go to <a href="https://containrrr.github.io/shoutrrr/services/overview">containrrr.github.io/shoutrrr/services/overview</a> to
|
||||
<p>Go to <a href="https://containrrr.dev/shoutrrr/v0.5/services/overview">containrrr.dev/shoutrrr/v0.5/services/overview</a> to
|
||||
learn more about the different service URLs you can use. You can define multiple services by space separating the
|
||||
URLs. (See example below)</p>
|
||||
<p>You can customize the message posted by setting a template.</p>
|
||||
|
|
@ -750,7 +758,7 @@ outputs timestamp and log level.</p>
|
|||
<p>If you want to adjust the date/time format it must show how the
|
||||
<a href="https://golang.org/pkg/time/#pkg-constants">reference time</a> (<em>Mon Jan 2 15:04:05 MST 2006</em>) would be displayed in your
|
||||
custom format.<br />
|
||||
i.e. The day of the year has to be 1, the month has to be 2 (february), the hour 3 (or 15 for 24h time) etc.</p>
|
||||
i.e., The day of the year has to be 1, the month has to be 2 (february), the hour 3 (or 15 for 24h time) etc.</p>
|
||||
</div>
|
||||
<p>Example:</p>
|
||||
<div class="highlight"><pre><span></span><code>docker run -d <span class="se">\</span>
|
||||
|
|
@ -761,11 +769,6 @@ i.e. The day of the year has to be 1, the month has to be 2 (february), the hour
|
|||
-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></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
|
@ -774,12 +777,12 @@ i.e. The day of the year has to be 1, the month has to be 2 (february), the hour
|
|||
|
||||
</main>
|
||||
|
||||
|
||||
<footer class="md-footer">
|
||||
<footer class="md-footer">
|
||||
|
||||
<nav class="md-footer__inner md-grid" aria-label="Footer">
|
||||
|
||||
<a href="../arguments/" class="md-footer__link md-footer__link--prev" rel="prev">
|
||||
|
||||
<a href="../arguments/" class="md-footer__link md-footer__link--prev" aria-label="Previous: Arguments" rel="prev">
|
||||
<div class="md-footer__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>
|
||||
|
|
@ -794,7 +797,8 @@ i.e. The day of the year has to be 1, the month has to be 2 (february), the hour
|
|||
</a>
|
||||
|
||||
|
||||
<a href="../container-selection/" class="md-footer__link md-footer__link--next" rel="next">
|
||||
|
||||
<a href="../container-selection/" class="md-footer__link md-footer__link--next" aria-label="Next: Container selection" rel="next">
|
||||
<div class="md-footer__title">
|
||||
<div class="md-ellipsis">
|
||||
<span class="md-footer__direction">
|
||||
|
|
@ -812,14 +816,15 @@ i.e. The day of the year has to be 1, the month has to be 2 (february), the hour
|
|||
|
||||
<div class="md-footer-meta md-typeset">
|
||||
<div class="md-footer-meta__inner md-grid">
|
||||
<div class="md-footer-copyright">
|
||||
|
||||
Made with
|
||||
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
|
||||
Material for MkDocs
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="md-copyright">
|
||||
|
||||
|
||||
Made with
|
||||
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
|
||||
Material for MkDocs
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -829,10 +834,10 @@ i.e. The day of the year has to be 1, the month has to be 2 (february), the hour
|
|||
<div class="md-dialog" data-md-component="dialog">
|
||||
<div class="md-dialog__inner md-typeset"></div>
|
||||
</div>
|
||||
<script id="__config" type="application/json">{"base": "..", "features": [], "translations": {"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"}, "search": "../assets/javascripts/workers/search.fe42c31b.min.js", "version": null}</script>
|
||||
<script id="__config" type="application/json">{"base": "..", "features": [], "translations": {"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", "select.version.title": "Select version"}, "search": "../assets/javascripts/workers/search.092fa1f6.min.js"}</script>
|
||||
|
||||
|
||||
<script src="../assets/javascripts/bundle.4ea5477f.min.js"></script>
|
||||
<script src="../assets/javascripts/bundle.5a9542cf.min.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue