Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Version string `yaml:"version"`
Services map[string]Service `yaml:"services"`
}
Config represents the top-level docker-compose.yml structure.
type DependsOn ¶
type DependsOn map[string]DependsOnCondition
DependsOn supports both forms of the depends_on key:
depends_on: [db, redis] ← list form
depends_on:
db:
condition: service_healthy ← map form
type DependsOnCondition ¶
type DependsOnCondition struct {
Condition string `yaml:"condition"`
}
DependsOnCondition holds the optional condition for a single dependency.
type Healthcheck ¶
type Healthcheck struct {
Test []string `yaml:"test"`
Interval string `yaml:"interval"`
Timeout string `yaml:"timeout"`
Retries int `yaml:"retries"`
}
Healthcheck mirrors the docker-compose healthcheck block.
type Service ¶
type Service struct {
Image string `yaml:"image"`
Build interface{} `yaml:"build"`
DependsOn DependsOn `yaml:"depends_on"`
Healthcheck *Healthcheck `yaml:"healthcheck"`
Ports []string `yaml:"ports"`
Environment map[string]string `yaml:"environment"`
}
Service represents a single service definition.
Click to show internal directories.
Click to hide internal directories.