Add healtcheck + some fixes
- better docs - add healtcheck based on docker-compoe commands or labels - fix some problems on secret names - better dependency check
This commit is contained in:
@@ -15,6 +15,15 @@ func NewCompose() *Compose {
|
||||
return c
|
||||
}
|
||||
|
||||
// HealthCheck manage generic type to handle TCP, HTTP and TCP health check.
|
||||
type HealthCheck struct {
|
||||
Test []string `yaml:"test"`
|
||||
Interval string `yaml:"interval"`
|
||||
Timeout string `yaml:"timeout"`
|
||||
Retries int `yaml:"retries"`
|
||||
StartPeriod string `yaml:"start_period"`
|
||||
}
|
||||
|
||||
// Service represent a "service" in a docker-compose file.
|
||||
type Service struct {
|
||||
Image string `yaml:"image"`
|
||||
@@ -26,4 +35,5 @@ type Service struct {
|
||||
Expose []int `yaml:"expose"`
|
||||
EnvFiles []string `yaml:"env_file"`
|
||||
RawBuild interface{} `yaml:"build"`
|
||||
HealthCheck *HealthCheck `yaml:"healthcheck"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user