mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-16 15:10:12 +01:00
fix accept headers and switch default interval to 24h
This commit is contained in:
parent
24cf0fd6a3
commit
89d57d2599
6 changed files with 41 additions and 30 deletions
|
|
@ -31,6 +31,7 @@ func CreateMockContainer(id string, name string, image string, created time.Time
|
|||
},
|
||||
)
|
||||
}
|
||||
|
||||
// CreateMockContainerWithImageInfo should only be used for testing
|
||||
func CreateMockContainerWithImageInfo(id string, name string, image string, created time.Time, imageInfo types.ImageInspect) container.Container {
|
||||
content := types.ContainerJSON{
|
||||
|
|
|
|||
|
|
@ -300,10 +300,11 @@ Should only be used for testing.`)
|
|||
|
||||
// SetDefaults provides default values for environment variables
|
||||
func SetDefaults() {
|
||||
day := time.Hour * 24 / time.Second
|
||||
viper.AutomaticEnv()
|
||||
viper.SetDefault("DOCKER_HOST", "unix:///var/run/docker.sock")
|
||||
viper.SetDefault("DOCKER_API_VERSION", DockerAPIMinVersion)
|
||||
viper.SetDefault("WATCHTOWER_POLL_INTERVAL", 300)
|
||||
viper.SetDefault("WATCHTOWER_POLL_INTERVAL", day)
|
||||
viper.SetDefault("WATCHTOWER_TIMEOUT", time.Second*10)
|
||||
viper.SetDefault("WATCHTOWER_NOTIFICATIONS", []string{})
|
||||
viper.SetDefault("WATCHTOWER_NOTIFICATIONS_LEVEL", "info")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue