Documentation
¶
Index ¶
- Constants
- func Cmd() *cobra.Command
- func CmdCreateDefault() *cobra.Command
- func Config(dir string, tplFile []byte, configFiles [][]byte) error
- func CreateYmlFile(dir string, force bool, tplFile []byte, cfg *YmlConfig) error
- func FlagConfig(cmd *cobra.Command) *[]string
- func FlagTpl(cmd *cobra.Command) *string
- type YmlConfig
Constants ¶
View Source
const ( // ConfigHelp contains the short help text for the command. ConfigHelp = "(Re)creates the container configuration YAML file for using Docker Compose or Docker Swarm" // ConfigHelpExtra contains the long help text for the command without the headline. ConfigHelpExtra = `This command (re)creates the container configuration YAML file in the given directory.` // ConfigCreateDefaultHelp contains the short help text for the command. ConfigCreateDefaultHelp = "(Re)creates the default setup configuration YAML file" // ConfigCreateDefaultHelpExtra contains the long help text for the command without the headline. ConfigCreateDefaultHelpExtra = `This command (re)creates the default setup configuration YAML file in the given directory.` )
Variables ¶
This section is empty.
Functions ¶
func CmdCreateDefault ¶
CmdCreateDefault returns the config-create-default subcommand.
func Config ¶
Config rebuilds the YAML file for using Docker Compose or Docker Swarm.
A custom template for the YAML file and YAML configs can be provided.
func CreateYmlFile ¶
CreateYmlFile builds the YAML file at the given directory. Use a truthy value for force to override an existing file.
func FlagConfig ¶
FlagConfig setups the config flag to the given cobra command.
Types ¶
type YmlConfig ¶
type YmlConfig struct { Filename string `yaml:"filename"` Host string `yaml:"host"` Port string `yaml:"port"` DisablePostgres *bool `yaml:"disablePostgres"` DisableDependsOn *bool `yaml:"disableDependsOn"` EnableLocalHTTPS *bool `yaml:"enableLocalHTTPS"` EnableAutoHTTPS *bool `yaml:"enableAutoHTTPS"` Defaults struct { ContainerRegistry string `yaml:"containerRegistry"` Tag string `yaml:"tag"` } `yaml:"defaults"` DefaultEnvironment map[string]string `yaml:"defaultEnvironment"` Services map[string]service `yaml:"services"` }
YmlConfig contains the (merged) configuration for the creation of the Docker Compose YAML file.
func NewYmlConfig ¶
NewYmlConfig creates a ymlConfig object from all given files. The files were merged together with the default config.
Click to show internal directories.
Click to hide internal directories.