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:
2022-02-14 14:37:09 +01:00
parent 8164603b47
commit 5a4d9e396d
7 changed files with 395 additions and 209 deletions

View File

@@ -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"`
}