Watchtower: Do not send emails every time watchtower is up?

Created on 27 Jan 2020  路  6Comments  路  Source: containrrr/watchtower

Hi all,
Since last update, Watchtower sends an email every time it is started and running. I do not want this. My server turns off and on multiple times a day and I get spammed with emails that have no utility. My goal is to go back to the previous state: send an email only when updates are found.

Here's is my docker-compose file. Am I missing something?
Thanks

version: "2"
services:
  watchtower:
    image: containrrr/watchtower
    container_name: watchtower
    restart: unless-stopped
    volumes:
        - /var/run/docker.sock:/var/run/docker.sock
        - /etc/localtime:/etc/localtime:ro
    environment:
        - WATCHTOWER_NOTIFICATIONS=email
        - WATCHTOWER_NOTIFICATION_EMAIL_FROM=<PRIVATE>
        - WATCHTOWER_NOTIFICATION_EMAIL_TO=<PRIVATE>
        - WATCHTOWER_NOTIFICATION_EMAIL_SERVER=<PRIVATE>
        - WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER=<PRIVATE>
        - WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD=<PRIVATE>
        - WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT=587
        - WATCHTOWER_SCHEDULE=0 0 0 * * *
        - WATCHTOWER_CLEANUP=true
        - WATCHTOWER_TIMEOUT=30s
        - WATCHTOWER_NOTIFICATIONS_LEVEL=info
    networks:
        default:
networks:
    default:
        external: 
            name: mynet  
Low Available Enhancement good first issue

Most helpful comment

Ok, I think I found the code pieces I need to edit by myself. I will submit a PR tomorrow (european time ;) )

All 6 comments

Hi there! 馃憢馃徏 As you're new to this repo, we'd like to suggest that you read our code of conduct as well as our contribution guidelines. Thanks a bunch for opening your first issue! 馃檹

Hi,

This behavior was changed to include an info-level notification in 0.3.10. Previous to that, it was set to debug-level. We can change this back and forth all we want, but unfortunately, no state will fit everyone.

If you'd like to add a --no-startup-message flag, feel free to submit a PR and I'd be happy to review it.

Thanks 馃檹馃徏

Well, I have no coding skills, someone else would have do to this.

I would like to dig into that. Can you provide me with some information where I should get started? At the moment I would probably start with internal/flags/flags.go

Ok, I think I found the code pieces I need to edit by myself. I will submit a PR tomorrow (european time ;) )

@lukwil your efforts are really appreciated!!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

darox picture darox  路  5Comments

norpan picture norpan  路  7Comments

Fredrik81 picture Fredrik81  路  5Comments

aogg picture aogg  路  3Comments

eloo picture eloo  路  5Comments