Documentation ¶
Index ¶
- Constants
- func GetApplicationDockerConfigs(options ApplicationOptions) (types.DockerConfigs, error)
- func GetDependenciesDockerConfigs(options ApplicationOptions) (types.DockerConfigs, error)
- func GetDockerComposeProjectName(appName string) string
- func GetLocalRunComposeFileNames() []string
- func GetServiceDockerConfigs(appConfig types.AppConfig, serviceConfig types.ServiceConfig, ...) (types.DockerConfigs, error)
- func GetServicesDockerConfigs(options ApplicationOptions) (types.DockerConfigs, error)
- func GetTestDockerComposeProjectName(appName string) string
- func WriteYML(dir, filename string, dockerConfigs types.DockerConfigs) error
- type ApplicationOptions
- type BuildMode
- type BuildModeEnvironment
- type BuildModeType
- type DevelopmentDockerComposeBuilder
- type ProductionDockerComposeBuilder
Constants ¶
const ( BuildModeTypeLocal = iota BuildModeTypeDeploy )
Possible values for BuildModeType
const ( BuildModeEnvironmentTest = iota BuildModeEnvironmentDevelopment BuildModeEnvironmentProduction )
Possible values for BuildModeEnvironment
const LocalDevelopmentComposeFileName = "run_development.yml"
LocalDevelopmentComposeFileName is the docker-compose file name for local development runs
const LocalProductionComposeFileName = "run_production.yml"
LocalProductionComposeFileName is the docker-compose file name for local production runs
const LocalTestComposeFileName = "test.yml"
LocalTestComposeFileName is the docker-compose file name for local test runs
Variables ¶
This section is empty.
Functions ¶
func GetApplicationDockerConfigs ¶ added in v0.28.4
func GetApplicationDockerConfigs(options ApplicationOptions) (types.DockerConfigs, error)
GetApplicationDockerConfigs returns the docker configs for a application
func GetDependenciesDockerConfigs ¶ added in v0.28.4
func GetDependenciesDockerConfigs(options ApplicationOptions) (types.DockerConfigs, error)
GetDependenciesDockerConfigs returns the docker configs for all the application dependencies
func GetDockerComposeProjectName ¶
GetDockerComposeProjectName creates a docker compose project name the same way docker-compose mutates the COMPOSE_PROJECT_NAME env var
func GetLocalRunComposeFileNames ¶ added in v0.29.0
func GetLocalRunComposeFileNames() []string
GetLocalRunComposeFileNames returns a list of docker-compose file names for local run processes
func GetServiceDockerConfigs ¶ added in v0.26.0
func GetServiceDockerConfigs(appConfig types.AppConfig, serviceConfig types.ServiceConfig, serviceData types.ServiceData, role string, appDir string, homeDir string, mode BuildMode) (types.DockerConfigs, error)
GetServiceDockerConfigs returns the DockerConfigs for a service and its dependencies in docker-compose.yml
func GetServicesDockerConfigs ¶ added in v0.28.4
func GetServicesDockerConfigs(options ApplicationOptions) (types.DockerConfigs, error)
GetServicesDockerConfigs returns the docker configs for all the application services
func GetTestDockerComposeProjectName ¶ added in v0.29.0
GetTestDockerComposeProjectName creates a docker compose project name for tests
Types ¶
type ApplicationOptions ¶ added in v0.28.4
type ApplicationOptions struct { AppConfig types.AppConfig AppDir string BuildMode BuildMode HomeDir string }
ApplicationOptions are the options to
type BuildMode ¶ added in v0.26.0
type BuildMode struct { Type BuildModeType Mount bool Environment BuildModeEnvironment }
BuildMode determines what type of docker compose config should be created
func (BuildMode) GetDockerComposeFileName ¶ added in v0.29.0
GetDockerComposeFileName returns the proper docker-compose file name for the build environment
type BuildModeEnvironment ¶ added in v0.29.0
type BuildModeEnvironment uint
BuildModeEnvironment indicates which environment to build the docker compose config for
type BuildModeType ¶ added in v0.29.0
type BuildModeType uint
BuildModeType indicates whether the docker compose config should be created local use or for deployment
type DevelopmentDockerComposeBuilder ¶ added in v0.26.0
type DevelopmentDockerComposeBuilder struct { AppConfig types.AppConfig ServiceConfig types.ServiceConfig ServiceData types.ServiceData Mode BuildMode BuiltAppDependencies map[string]config.AppDevelopmentDependency BuiltServiceDependencies map[string]config.AppDevelopmentDependency Role string AppDir string HomeDir string }
DevelopmentDockerComposeBuilder contains the docker-compose.yml config for a single service
func NewDevelopmentDockerComposeBuilder ¶ added in v0.26.0
func NewDevelopmentDockerComposeBuilder(appConfig types.AppConfig, serviceConfig types.ServiceConfig, serviceData types.ServiceData, role, appDir, homeDir string, mode BuildMode) *DevelopmentDockerComposeBuilder
NewDevelopmentDockerComposeBuilder is DevelopmentDockerComposeBuilder's constructor
type ProductionDockerComposeBuilder ¶ added in v0.26.0
type ProductionDockerComposeBuilder struct { ServiceData types.ServiceData BuiltDependencies map[string]config.AppProductionDependency Role string AppDir string }
ProductionDockerComposeBuilder contains the docker-compose.yml config for a single service
func NewProductionDockerComposeBuilder ¶ added in v0.26.0
func NewProductionDockerComposeBuilder(appConfig types.AppConfig, serviceConfig types.ServiceConfig, serviceData types.ServiceData, role, appDir string) *ProductionDockerComposeBuilder
NewProductionDockerComposeBuilder is ProductionDockerComposeBuilder's constructor