Documentation
¶
Overview ¶
Package compose generates a docker-compose project from an azlocal Config.
Index ¶
- func DefaultPath() string
- func GenerateServiceBusConfig(sb *config.ServiceBusService) ([]byte, error)
- func Marshal(p *Project) ([]byte, error)
- func ServiceBusConfigPath() string
- func Write(p *Project) (string, error)
- func WriteProject(cfg *config.Config) (string, error)
- type Healthcheck
- type Project
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultPath ¶
func DefaultPath() string
DefaultPath returns the path where azlocal writes the generated compose file.
func GenerateServiceBusConfig ¶ added in v0.1.1
func GenerateServiceBusConfig(sb *config.ServiceBusService) ([]byte, error)
GenerateServiceBusConfig renders the emulator Config.json for the declared queues, topics, and subscriptions.
func ServiceBusConfigPath ¶ added in v0.1.1
func ServiceBusConfigPath() string
ServiceBusConfigPath returns the path of the generated Service Bus emulator config, written next to the compose file so the bind mount resolves.
Types ¶
type Healthcheck ¶
type Project ¶
type Project struct {
Name string `yaml:"name,omitempty"`
Services map[string]Service `yaml:"services"`
Volumes map[string]any `yaml:"volumes,omitempty"`
Networks map[string]any `yaml:"networks,omitempty"`
}
Project is a minimal subset of the docker-compose v3 schema, enough for our purposes. It marshals as standard compose YAML.
type Service ¶
type Service struct {
Image string `yaml:"image,omitempty"`
Build any `yaml:"build,omitempty"`
Command any `yaml:"command,omitempty"`
Ports []string `yaml:"ports,omitempty"`
Environment map[string]string `yaml:"environment,omitempty"`
Volumes []string `yaml:"volumes,omitempty"`
DependsOn any `yaml:"depends_on,omitempty"`
Healthcheck *Healthcheck `yaml:"healthcheck,omitempty"`
Restart string `yaml:"restart,omitempty"`
Networks []string `yaml:"networks,omitempty"`
Platform string `yaml:"platform,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.