fix accept headers and switch default interval to 24h

This commit is contained in:
Simon Aronsson 2020-12-06 12:49:26 +01:00
parent 24cf0fd6a3
commit 89d57d2599
No known key found for this signature in database
GPG key ID: 8DA57A5FD341605B
6 changed files with 41 additions and 30 deletions

View file

@ -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{

View file

@ -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")