Email Notification not working with scope instance #2014
Unanswered
vandrivergit
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Morning,
I've searched a number of posts and googled but I couldn't find the answer.
I'm trying to get notifications working when I add the scope instance to Watchtower.
With the base code, I get the notification email okay, the email comes through at 6.00am and tells me if there are any container updates, or if I set the pole interval to 60 seconds I get the email 60 seconds after the Watchtower container starts.
services:
watchtower:
container_name: watchtower
image: containrrr/watchtower:latest-dev
volumes: /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- TZ=Europe/Belfast
- WATCHTOWER_CLEANUP=true
- WATCHTOWER_INCLUDE_RESTARTING=true
#- WATCHTOWER_POLL_INTERVAL=60
- WATCHTOWER_SCHEDULE=0 5 6 * * *
#- WATCHTOWER_DEBUG=true
- WATCHTOWER_MONITOR_ONLY=true
- WATCHTOWER_NOTIFICATION_EMAIL_FROM=
- WATCHTOWER_NOTIFICATION_EMAIL_TO=
- WATCHTOWER_NOTIFICATION_EMAIL_SERVER=smtp.gmail.com
- WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT=587
- WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER=
- WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD=
- WATCHTOWER_NOTIFICATION_EMAIL_DELAY=2
- WATCHTOWER_NOTIFICATIONS=email
When I add a scope to Watchtower, the notifications don't work, no emails come through at 6.00am or 60 secs.
services:
watchtower-notify:
container_name: watchtower-notify
image: containrrr/watchtower:latest-dev
volumes: [ /var/run/docker.sock:/var/run/docker.sock:ro ]
command: --debug -lpretty --scope notify
labels:
com.centurylinklabs.watchtower.scope: notify
environment:
- TZ=Europe/Belfast
- WATCHTOWER_CLEANUP=true
- WATCHTOWER_INCLUDE_RESTARTING=true
#- WATCHTOWER_POLL_INTERVAL=10
- WATCHTOWER_SCHEDULE=0 5 6 * * *
#- WATCHTOWER_DEBUG=true
- WATCHTOWER_MONITOR_ONLY=true
- WATCHTOWER_NOTIFICATION_EMAIL_FROM=
- WATCHTOWER_NOTIFICATION_EMAIL_TO=
- WATCHTOWER_NOTIFICATION_EMAIL_SERVER=smtp.gmail.com
- WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT=587
- WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER=s
- WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD=
- WATCHTOWER_NOTIFICATION_EMAIL_DELAY=2
- WATCHTOWER_NOTIFICATIONS=email
Using either code, I do get the initial email from Watchtower:
Watchtower v1.7.1-17-g76f9cea
Using notifications: smtp
Only checking containers in scope "update"
Scheduling first run: 2024-08-18 06:00:00 +0100 BST
Note that the first check will be performed in 7 hours, 3 minutes, 57 seconds
But with the scoped instance that email never arrives at 6.00am.
I have added the scope code below to one other container for testing purposes:
I have a feeling it may be something to do with the command line?
Cheers
Beta Was this translation helpful? Give feedback.
All reactions