mirror of
https://github.com/containrrr/watchtower.git
synced 2025-09-22 05:40:50 +02:00
feat: allow hostname override for notifiers (#994)
* feat: allow hostname override for email notifier As it currently stands all notifiers utilise `os.Hostname` to populate their titles/subjects. When utilising Docker with a bridged network if you set the hostname for a container to an external DNS hostname Docker's internal DNS resolver will override said hostname for all containers within the bridged network. This change allows a user to specify what hostname should be represented in the email notifications without having to change the `os.Hostname`. * feat: allow custom hostname for all notifiers * docs: adjust notification hostname flag
This commit is contained in:
parent
f508c92ae0
commit
dc12a1ac7f
9 changed files with 45 additions and 20 deletions
|
@ -185,6 +185,12 @@ func RegisterNotificationFlags(rootCmd *cobra.Command) {
|
|||
viper.GetString("WATCHTOWER_NOTIFICATIONS_LEVEL"),
|
||||
"The log level used for sending notifications. Possible values: panic, fatal, error, warn, info or debug")
|
||||
|
||||
flags.StringP(
|
||||
"notifications-hostname",
|
||||
"",
|
||||
viper.GetString("WATCHTOWER_NOTIFICATIONS_HOSTNAME"),
|
||||
"Custom hostname for notification titles")
|
||||
|
||||
flags.StringP(
|
||||
"notification-email-from",
|
||||
"",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue