- moving cpus to string to allow for env vars and other config options besides hardcoded floats
27 lines
691 B
Go
27 lines
691 B
Go
package compose
|
|
|
|
type RestartConfig struct {
|
|
Condition *string `yaml:"condition"`
|
|
Delay *string `yaml:"delay"`
|
|
MaxAttempts *int `yaml:"max_attempts"`
|
|
Window *string `yaml:"window"`
|
|
}
|
|
|
|
type DeployConfig struct {
|
|
Policy *RestartConfig `yaml:"restart_policy"`
|
|
}
|
|
|
|
type ServiceConfig struct {
|
|
MemLimit *string `yaml:"mem_limit"`
|
|
Cpus *string `yaml:"cpus"`
|
|
Ports *[]string `yaml:"ports"`
|
|
User *string `yaml:"user"`
|
|
Deploy *DeployConfig `yaml:"deploy"`
|
|
SecOpts *[]string `yaml:"security_opt"`
|
|
Privileged *bool `yaml:"privileged"`
|
|
}
|
|
|
|
type Compose struct {
|
|
Services map[string]ServiceConfig `yaml:"services"`
|
|
}
|