dockercompose

package
v1.24.5 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsJWTSecretCompatibleWithHasuraAuth added in v1.15.3

func IsJWTSecretCompatibleWithHasuraAuth(
	jwtSecret *model.ConfigJWTSecret,
) bool

func URL

func URL(host, service string, port uint, useTLS bool) string

Types

type ComposeFile

type ComposeFile struct {
	Services map[string]*Service `yaml:"services"`
	Volumes  map[string]struct{} `yaml:"volumes"`
}

func ComposeFileFromConfig

func ComposeFileFromConfig(
	cfg *model.ConfigConfig,
	subdomain string,
	projectName string,
	httpPort uint,
	useTLS bool,
	postgresPort uint,
	dataFolder string,
	nhostFolder string,
	dotNhostFolder string,
	rootFolder string,
	ports ExposePorts,
	branch string,
	dashboardVersion string,
	configserverImage string,
	startFunctions bool,
	caCertificatesPath string,
	runServices ...*RunService,
) (*ComposeFile, error)

type DependsOn

type DependsOn struct {
	Condition string `yaml:"condition"`
}

type Docker

type Docker struct{}

func NewDocker

func NewDocker() *Docker

func (*Docker) HasuraWrapper

func (d *Docker) HasuraWrapper(
	ctx context.Context,
	subdomain,
	nhostfolder,
	hasuraVersion string,
	exrtaArgs ...string,
) error

type DockerCompose

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

func New

func New(workingDir, filepath, projectName string) *DockerCompose

func (*DockerCompose) ApplyMetadata

func (dc *DockerCompose) ApplyMetadata(ctx context.Context) error

func (*DockerCompose) ApplyMigrations

func (dc *DockerCompose) ApplyMigrations(ctx context.Context) error

func (*DockerCompose) ApplySeeds

func (dc *DockerCompose) ApplySeeds(ctx context.Context) error

func (*DockerCompose) Logs

func (dc *DockerCompose) Logs(ctx context.Context, extraArgs ...string) error

func (*DockerCompose) ReloadMetadata added in v1.14.0

func (dc *DockerCompose) ReloadMetadata(ctx context.Context) error

func (*DockerCompose) Start

func (dc *DockerCompose) Start(ctx context.Context) error

func (*DockerCompose) Stop

func (dc *DockerCompose) Stop(ctx context.Context, volumes bool) error

func (*DockerCompose) Wrapper

func (dc *DockerCompose) Wrapper(ctx context.Context, extraArgs ...string) error

func (*DockerCompose) WriteComposeFile

func (dc *DockerCompose) WriteComposeFile(composeFile *ComposeFile) error

type ExposePorts added in v1.5.3

type ExposePorts struct {
	Auth      uint
	Storage   uint
	Graphql   uint
	Console   uint
	Functions uint
}

type HealthCheck

type HealthCheck struct {
	Test        []string `yaml:"test"`
	Timeout     string   `yaml:"timeout"`
	Interval    string   `yaml:"interval"`
	StartPeriod string   `yaml:"start_period"`
}

type Ingress

type Ingress struct {
	Name    string
	TLS     bool
	Rule    string
	Port    uint
	Rewrite *Rewrite
}

func (Ingress) Labels

func (i Ingress) Labels() map[string]string

type Ingresses

type Ingresses []Ingress

func (Ingresses) Labels

func (i Ingresses) Labels() map[string]string

type Port

type Port struct {
	Mode      string `yaml:"mode"`
	Target    uint   `yaml:"target"`
	Published string `yaml:"published"`
	Protocol  string `yaml:"protocol"`
}

type Rewrite

type Rewrite struct {
	Regex       string
	Replacement string
}

type RunService added in v1.14.0

type RunService struct {
	Config *model.ConfigRunServiceConfig
	Path   string
}

type Service

type Service struct {
	Image       string               `yaml:"image"`
	DependsOn   map[string]DependsOn `yaml:"depends_on,omitempty"`
	EntryPoint  []string             `yaml:"entrypoint,omitempty"`
	Command     []string             `yaml:"command,omitempty"`
	Environment map[string]string    `yaml:"environment,omitempty"`
	ExtraHosts  []string             `yaml:"extra_hosts"`
	HealthCheck *HealthCheck         `yaml:"healthcheck,omitempty"`
	Labels      map[string]string    `yaml:"labels,omitempty"`
	Ports       []Port               `yaml:"ports,omitempty"`
	Restart     string               `yaml:"restart"`
	Volumes     []Volume             `yaml:"volumes,omitempty"`
	WorkingDir  *string              `yaml:"working_dir,omitempty"`
}

type Volume

type Volume struct {
	Type     string `yaml:"type"`
	Source   string `yaml:"source"`
	Target   string `yaml:"target"`
	ReadOnly *bool  `yaml:"read_only,omitempty"`
}

Jump to

Keyboard shortcuts

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