compose

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPlatform = "linux/amd64"

	ADLabel           = "app.arenadata.io"
	ADAppTypeLabelKey = ADLabel + "/type"

	SecretsPath = "/run/csecrets"

	ADCMImage              = "hub.arenadata.io/adcm/adcm"
	ADCMTag                = "2.6.0"
	ADCMPublishPort uint16 = 8000

	ADPGImage              = "hub.arenadata.io/adcm/postgres"
	ADPGTag                = "v16.3.1"
	ADPGPublishPort uint16 = 5432

	ConsulImage              = "hub.arenadata.io/adcm/consul"
	ConsulTag                = "v0.0.0"
	ConsulPublishPort uint16 = 8500

	VaultImage              = "openbao/openbao"
	VaultTag                = "2.2.0"
	VaultPublishPort uint16 = 8200
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Compose

type Compose struct {
	// contains filtered or unexported fields
}

func NewComposeService

func NewComposeService(ops ...command.CLIOption) (*Compose, error)

func (Compose) Down

func (c Compose) Down(ctx context.Context, projectName string, volumes bool) error

func (Compose) Info

func (c Compose) Info(ctx context.Context) (system.Info, error)

func (Compose) List

func (c Compose) List(ctx context.Context, all bool) ([]api.Stack, error)

func (Compose) Up

func (c Compose) Up(ctx context.Context, prj *types.Project) error

type Depended

type Depended struct {
	Service   string
	Condition string
}

type Env

type Env struct {
	Name  string
	Value *string
}

type HealthCheckConfig

type HealthCheckConfig struct {
	Cmd           []string
	Interval      time.Duration
	Timeout       time.Duration
	StartPeriod   time.Duration
	StartInterval time.Duration
	Retries       uint64
}

type ModHelper

type ModHelper func(*composeTypes.Project) error

func CapAdd

func CapAdd(svcName string, caps ...string) ModHelper

func CapDrop

func CapDrop(svcName string, caps ...string) ModHelper

func CapDropAll

func CapDropAll(svcName string) ModHelper

func Command

func Command(svcName string, command []string) ModHelper

func DependsOn

func DependsOn(svcName string, dependsOnService ...Depended) ModHelper

func Environment

func Environment(svcName string, envs ...Env) ModHelper

func HealthCheck

func HealthCheck(svcName string, conf HealthCheckConfig) ModHelper

func Hostname

func Hostname(svcName, hostname string) ModHelper

func Image

func Image(svcName, image string) ModHelper

func Labels

func Labels(svcName string, labels map[string]string) ModHelper

func Platform

func Platform(svcName, platform string) ModHelper

func PublishPort

func PublishPort(svcName string, publishPort, targetPort uint16) ModHelper

func PullPolicy

func PullPolicy(svcName, pullPolicy string) ModHelper

func ReadOnlyRootFilesystem

func ReadOnlyRootFilesystem(svcName string) ModHelper

func RestartPolicy

func RestartPolicy(svcName, restartPolicy string) ModHelper

func Secrets

func Secrets(svcName string, secrets ...Secret) ModHelper

func SecurityOpts

func SecurityOpts(svcName string, securityOpts ...string) ModHelper

func SecurityOptsNoNewPrivileges

func SecurityOptsNoNewPrivileges(svcName string) ModHelper

func TmpFs

func TmpFs(svcName string, mountPoints ...string) ModHelper

func User

func User(svcName, user, group string) ModHelper

func Volumes

func Volumes(svcName string, volumes ...string) ModHelper

type ModHelpers

type ModHelpers []ModHelper

func NewModHelpers

func NewModHelpers() ModHelpers

func (ModHelpers) Run

func (h ModHelpers) Run(prj *composeTypes.Project) error

type Secret

type Secret struct {
	Source   string
	EnvKey   string
	Value    string
	ENV      bool
	Rewrite  bool
	FileMode *uint32
}

Jump to

Keyboard shortcuts

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