Documentation
¶
Index ¶
Constants ¶
View Source
const ( DependencyConditionStarted = "service_started" DependencyConditionHealthy = "service_healthy" DependencyConditionCompletedSuccessfully = "service_completed_successfully" )
DependencyCondition constants
Variables ¶
This section is empty.
Functions ¶
func ParseComposeFileWithPath ¶
func ParseComposeFileWithPath(mConfig *fly.MachineConfig, composePath string) error
ParseComposeFileWithPath parses a Docker Compose file and converts it to machine config
func ParseContainerConfig ¶
func ParseContainerConfig(mConfig *fly.MachineConfig, composePath, machineConfigStr, configFilePath, containerName string) error
ParseContainerConfig determines the type of container configuration and parses it directly into mConfig
Types ¶
type ComposeDependency ¶
type ComposeDependency struct {
Condition string `yaml:"condition"`
Required bool `yaml:"required"`
Restart bool `yaml:"restart"`
}
ComposeDependency represents a service dependency with conditions
type ComposeFile ¶
type ComposeFile struct {
Version string `yaml:"version"`
Services map[string]ComposeService `yaml:"services"`
Volumes map[string]interface{} `yaml:"volumes"`
Networks map[string]interface{} `yaml:"networks"`
Configs map[string]interface{} `yaml:"configs"`
Secrets map[string]interface{} `yaml:"secrets"`
}
ComposeFile represents a Docker Compose file structure
type ComposeHealthcheck ¶
type ComposeHealthcheck struct {
Test interface{} `yaml:"test"`
Interval string `yaml:"interval"`
Timeout string `yaml:"timeout"`
Retries int `yaml:"retries"`
StartPeriod string `yaml:"start_period"`
}
ComposeHealthcheck represents a health check configuration
type ComposeService ¶
type ComposeService struct {
Image string `yaml:"image"`
Build interface{} `yaml:"build"`
Environment map[string]string `yaml:"environment"`
Volumes []string `yaml:"volumes"`
Ports []string `yaml:"ports"`
Command interface{} `yaml:"command"`
Entrypoint interface{} `yaml:"entrypoint"`
WorkingDir string `yaml:"working_dir"`
User string `yaml:"user"`
Restart string `yaml:"restart"`
Configs []interface{} `yaml:"configs"`
Secrets []interface{} `yaml:"secrets"`
Deploy map[string]interface{} `yaml:"deploy"`
DependsOn interface{} `yaml:"depends_on"`
Healthcheck *ComposeHealthcheck `yaml:"healthcheck"`
Extra map[string]interface{} `yaml:",inline"`
}
ComposeService represents a service definition in Docker Compose
type ServiceDependencies ¶
type ServiceDependencies struct {
Dependencies map[string]ComposeDependency
}
ServiceDependencies represents parsed dependencies for a service
Click to show internal directories.
Click to hide internal directories.