composebuilder

package
v0.29.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BuildModeTypeLocal = iota
	BuildModeTypeDeploy
)

Possible values for BuildModeType

View Source
const (
	BuildModeEnvironmentTest = iota
	BuildModeEnvironmentDevelopment
	BuildModeEnvironmentProduction
)

Possible values for BuildModeEnvironment

View Source
const LocalDevelopmentComposeFileName = "run_development.yml"

LocalDevelopmentComposeFileName is the docker-compose file name for local development runs

View Source
const LocalProductionComposeFileName = "run_production.yml"

LocalProductionComposeFileName is the docker-compose file name for local production runs

View Source
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

func GetDockerComposeProjectName(appName string) string

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

func GetTestDockerComposeProjectName(appName string) string

GetTestDockerComposeProjectName creates a docker compose project name for tests

func WriteYML added in v0.28.4

func WriteYML(dir, filename string, dockerConfigs types.DockerConfigs) error

WriteYML writes a docker-compose.yml file

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

func (b BuildMode) GetDockerComposeFileName() string

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL