Add watchtower to ansible

This commit is contained in:
Tobias Reisinger 2023-06-16 13:15:45 +02:00
parent 753682aa86
commit 5908976abc
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
10 changed files with 64 additions and 49 deletions

View file

@ -1,14 +0,0 @@
WATCHTOWER_LABEL_ENABLE=true
WATCHTOWER_CLEANUP=true
WATCHTOWER_SCHEDULE="0 27 20 * * *"
WATCHTOWER_NOTIFICATIONS=email
WATCHTOWER_NOTIFICATION_EMAIL_FROM=watchtower@serguzim.me
WATCHTOWER_NOTIFICATION_EMAIL_TO=tobias@msrg.cc
WATCHTOWER_NOTIFICATION_EMAIL_SERVER=mail.serguzim.me
WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT=587
WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER=watchtower@serguzim.me
WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD=
WATCHTOWER_NOTIFICATION_EMAIL_DELAY=5
#WATCHTOWER_RUN_ONCE=true

View file

@ -1,12 +1,18 @@
version: "3"
networks:
apps:
external: true
services:
watchtower:
image: containrrr/watchtower
restart: always
env_file:
- .env
- .secret.env
hostname: ${HOSTNAME}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
app:
env_file:
- service.env
hostname: portalo
image: containerrr/watchtower
labels:
com.centurylinklabs.watchtower.enable: false
networks:
apps:
aliases:
- watchtower
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock