From ad655bdd47d79f6245040c0f8c51fee31064e65b Mon Sep 17 00:00:00 2001 From: mr-vercetti <87.milewski@gmail.com> Date: Fri, 4 Feb 2022 22:47:06 +0000 Subject: [PATCH] Add watchtower --- docker/.env.example | 8 ++++++++ docker/stacks/watchtower/watchtower.yml | 27 +++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 docker/stacks/watchtower/watchtower.yml diff --git a/docker/.env.example b/docker/.env.example index 3db21a8..16b6854 100644 --- a/docker/.env.example +++ b/docker/.env.example @@ -5,6 +5,14 @@ APPS_DIR= DATA_DIR= DOMAIN= +# Email notifications (watchguard) +EMAIL_FROM= +EMAIL_TO= +EMAIL_SERVER= +EMAIL_USER= +EMAIL_PW= +EMAIL_PORT= + # nextcloud-db DB_ROOT_PW= DB_NAME= diff --git a/docker/stacks/watchtower/watchtower.yml b/docker/stacks/watchtower/watchtower.yml new file mode 100644 index 0000000..8c81ac2 --- /dev/null +++ b/docker/stacks/watchtower/watchtower.yml @@ -0,0 +1,27 @@ +version: '3.7' + +services: + watchtower: + image: containrrr/watchtower + container_name: watchtower + networks: + - watchtower + environment: + - TZ=${TIMEZONE} + - WATCHTOWER_MONITOR_ONLY=true + - WATCHTOWER_CLEANUP=true + - WATCHTOWER_SCHEDULE=0 0 1 * * MON + - WATCHTOWER_NOTIFICATIONS=email + - WATCHTOWER_NOTIFICATION_EMAIL_FROM=${EMAIL_FROM} + - WATCHTOWER_NOTIFICATION_EMAIL_TO=${EMAIL_TO} + - WATCHTOWER_NOTIFICATION_EMAIL_SERVER=${EMAIL_SERVER} + - WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER=${EMAIL_USER} + - WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD=${EMAIL_PW} + - WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT=${EMAIL_PORT} + volumes: + - /var/run/docker.sock:/var/run/docker.sock + restart: unless-stopped + +networks: + watchtower: + name: watchtower