composebuilder

package
v0.28.4 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

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(appDir string) string

GetDockerComposeProjectName creates a docker compose project name the same way docker-compose mutates the COMPOSE_PROJECT_NAME env var

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 WriteYML added in v0.28.4

func WriteYML(dir 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 uint

BuildMode is what type of docker compose config should be created

const (
	// BuildModeLocalDevelopment used for `exo run` and `exo test` without flags
	BuildModeLocalDevelopment BuildMode = iota
	// BuildModeLocalDevelopmentNoMount used for `exo run` and `exo test` with no-mount flag
	BuildModeLocalDevelopmentNoMount
	// BuildModeLocalProduction used for `exo run` with production flag
	BuildModeLocalProduction
	// BuildModeDeployProduction used for `exo deploy`
	BuildModeDeployProduction
)

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