deploy

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: MIT Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deploy

func Deploy(cfg *config.Config) error

Deploy performs a full deployment using the default client

func DeployWithClient

func DeployWithClient(cfg *config.Config, client Deployer, opts *Options) error

DeployWithClient performs a deployment with a custom client (for testing)

func Restart

func Restart(cfg *config.Config) error

Restart restarts the stack without building a new image

func RestartWithClient

func RestartWithClient(cfg *config.Config, client Deployer, opts *Options) error

RestartWithClient restarts with a custom client (for testing)

func Rollback

func Rollback(cfg *config.Config) error

Rollback rolls back to the previous version

func RollbackWithClient

func RollbackWithClient(cfg *config.Config, client Deployer, opts *Options) error

RollbackWithClient rolls back with a custom client (for testing)

Types

type Deployer

type Deployer interface {
	GetCurrentVersion(ctx context.Context) (int, error)
	MakeTempDir(ctx context.Context) (string, error)
	Rsync(ctx context.Context, localPath, remotePath string) error
	BuildImage(ctx context.Context, buildDir string, version int) error
	UpdateCompose(ctx context.Context, version int) error
	RestartStack(ctx context.Context) error
	Cleanup(ctx context.Context, path string) error
	StackExists(ctx context.Context) (bool, error)
	CreateStack(ctx context.Context, composeContent string) error
	EnsureNetwork(ctx context.Context, name string) error
	CreateEnvFile(ctx context.Context, serviceName string) error
	IsServiceRunning(ctx context.Context, serviceName string) (bool, error)
	PullImage(ctx context.Context, image string) error
	StartService(ctx context.Context, serviceName string) error
}

Deployer defines the interface for deployment operations

type Options

type Options struct {
	// Output is where to write progress messages (defaults to os.Stdout)
	Output io.Writer
	// Dependencies maps dependency service names to their configs
	Dependencies map[string]*config.Config
}

Options holds configuration for the deployment

Jump to

Keyboard shortcuts

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