Configuration transposed into environment variables (#82)

Configuration file not required anymore
DIUN_DB env var renamed DIUN_DB_PATH
Only accept duration as timeout value (10 becomes 10s)
Add getting started doc
Enhanced documentation
Add note about test notifications (#79)
Improve configuration management
Fix telegram init
All fields in configuration now camelCased
Improve configuration validation
Update doc
Update FAQ

Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2020-06-07 19:58:49 +00:00
committed by GitHub
parent 56d110bdec
commit 349917e7e4
100 changed files with 10336 additions and 885 deletions

View File

@@ -2,32 +2,17 @@ package model
// Providers represents a provider configuration
type Providers struct {
Docker *PrdDocker `yaml:"docker,omitempty" json:",omitempty"`
Swarm *PrdSwarm `yaml:"swarm,omitempty" json:",omitempty"`
File *PrdFile `yaml:"file,omitempty" json:",omitempty"`
Docker *PrdDocker `yaml:"docker,omitempty" json:"docker,omitempty" label:"allowEmpty"`
Swarm *PrdSwarm `yaml:"swarm,omitempty" json:"swarm,omitempty" label:"allowEmpty"`
File *PrdFile `yaml:"file,omitempty" json:"file,omitempty"`
}
// PrdDocker holds docker provider configuration
type PrdDocker struct {
Endpoint string `yaml:"endpoint,omitempty" json:",omitempty"`
APIVersion string `yaml:"api_version,omitempty" json:",omitempty"`
TLSCertsPath string `yaml:"tls_certs_path,omitempty" json:",omitempty"`
TLSVerify *bool `yaml:"tls_verify,omitempty" json:",omitempty"`
WatchByDefault *bool `yaml:"watch_by_default,omitempty" json:",omitempty"`
WatchStopped *bool `yaml:"watch_stopped,omitempty" json:",omitempty"`
// GetDefaults gets the default values
func (s *Providers) GetDefaults() *Providers {
return nil
}
// PrdSwarm holds swarm provider configuration
type PrdSwarm struct {
Endpoint string `yaml:"endpoint,omitempty" json:",omitempty"`
APIVersion string `yaml:"api_version,omitempty" json:",omitempty"`
TLSCertsPath string `yaml:"tls_certs_path,omitempty" json:",omitempty"`
TLSVerify *bool `yaml:"tls_verify,omitempty" json:",omitempty"`
WatchByDefault *bool `yaml:"watch_by_default,omitempty" json:",omitempty"`
}
// PrdFile holds file provider configuration
type PrdFile struct {
Filename string `yaml:"filename,omitempty" json:",omitempty"`
Directory string `yaml:"directory,omitempty" json:",omitempty"`
// SetDefaults sets the default values
func (s *Providers) SetDefaults() {
// noop
}