nextdeploy

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 7 Imported by: 0 modules, 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

This section is empty.

Types

type Alert

type Alert struct {
	Email        string   `yaml:"email"`
	SlackWebhook string   `yaml:"slack_webhook"`
	NotifyOn     []string `yaml:"notify_on"`
}

type AppConfig

type AppConfig struct {
	Name        string `yaml:"name"`
	Environment string `yaml:"environment"`
	Domain      string `yaml:"domain"`
	Port        int    `yaml:"port"`
}

AppConfig represents application metadata.

type Backup

type Backup struct {
	Enabled       bool    `yaml:"enabled"`
	Frequency     string  `yaml:"frequency"`
	RetentionDays int     `yaml:"retention_days"`
	Storage       Storage `yaml:"storage"`
}

Backup represents backup configuration.

type Config

type Config struct {
	Version    string       `yaml:"version"`
	App        AppConfig    `yaml:"app"`
	Repository Repository   `yaml:"repository"`
	Docker     DockerConfig `yaml:"docker"`
	Deployment Deployment   `yaml:"deployment"`
	Database   Database     `yaml:"database"`
	Logging    Logging      `yaml:"logging"`
	Monitoring Monitoring   `yaml:"monitoring"`
	Backup     Backup       `yaml:"backup"`
	SSL        SSL          `yaml:"ssl"`
	Webhook    Webhook      `yaml:"webhook"`
}

func Load

func Load(filename string) (*Config, error)

Load reads a nextdeploy.yml file and returns a Config struct.

func New

func New() *Config

func (*Config) AddContainerPort

func (c *Config) AddContainerPort(port string) error

AddContainerPort adds a port mapping to the container configuration.

func (*Config) AddContainerVolume

func (c *Config) AddContainerVolume(volume string) error

AddContainerVolume adds a volume to the container configuration.

func (*Config) AddDockerBuildArg

func (c *Config) AddDockerBuildArg(key, value string)

AddDockerBuildArg adds or updates a Docker build argument.

func (*Config) AddFailureWebhook

func (c *Config) AddFailureWebhook(url string)

AddFailureWebhook adds a webhook to be triggered on failed deployment.

func (*Config) AddSuccessWebhook

func (c *Config) AddSuccessWebhook(url string)

AddSuccessWebhook adds a webhook to be triggered on successful deployment.

func (*Config) ConfigOkay

func (c *Config) ConfigOkay() (bool, error)

func (*Config) RemoveContainerPort

func (c *Config) RemoveContainerPort(port string) error

RemoveContainerPort removes a port mapping from the container configuration.

func (*Config) RemoveContainerVolume

func (c *Config) RemoveContainerVolume(volume string) error

RemoveContainerVolume removes a volume from the container configuration.

func (*Config) RemoveDockerBuildArg

func (c *Config) RemoveDockerBuildArg(key string)

RemoveDockerBuildArg removes a Docker build argument.

func (*Config) RemoveFailureWebhook

func (c *Config) RemoveFailureWebhook(url string) error

RemoveFailureWebhook removes a webhook from the failure list.

func (*Config) RemoveSuccessWebhook

func (c *Config) RemoveSuccessWebhook(url string) error

RemoveSuccessWebhook removes a webhook from the success list.

func (*Config) Save

func (c *Config) Save(filename string) error

Save writes the Config to a nextdeploy.yml file.

func (*Config) UpdateApp

func (c *Config) UpdateApp(name, environment, domain string, port int)

UpdateApp updates the app configuration.

func (*Config) UpdateRepository

func (c *Config) UpdateRepository(url, branch string, autoDeploy bool, webhookSecret string)

UpdateRepository updates the repository configuration.

func (*Config) Validate

func (c *Config) Validate(Config *Config) error

Validate checks if the configuration is valid.

type Container

type Container struct {
	Name        string               `yaml:"name"`
	Restart     string               `yaml:"restart"`
	EnvFile     string               `yaml:"env_file"`
	Volumes     []string             `yaml:"volumes"`
	Ports       []string             `yaml:"ports"`
	Healthcheck ContainerHealthcheck `yaml:"healthcheck"`
}

type ContainerHealthcheck

type ContainerHealthcheck struct {
	Path     string `yaml:"path"`
	Interval string `yaml:"interval"`
	Timeout  string `yaml:"timeout"`
	Retries  int    `yaml:"retries"`
}

type Database

type Database struct {
	Type     string `yaml:"type"`
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	Username string `yaml:"username"`
	// #nosec G117
	Password        string `yaml:"password"`
	Name            string `yaml:"name"`
	MigrateOnDeploy bool   `yaml:"migrate_on_deploy"`
}

Database represents database configuration.

type Deployment

type Deployment struct {
	Server    Server    `yaml:"server"`
	Container Container `yaml:"container"`
}

Deployment represents deployment target configuration.

type DockerBuild

type DockerBuild struct {
	Context    string            `yaml:"context"`
	Dockerfile string            `yaml:"dockerfile"`
	Args       map[string]string `yaml:"args"`
	NoCache    bool              `yaml:"no_cache"`
}

type DockerConfig

type DockerConfig struct {
	Build    DockerBuild `yaml:"build"`
	Image    string      `yaml:"image"`
	Registry string      `yaml:"registry"`
	Push     bool        `yaml:"push"`
}

DockerConfig represents Docker build configuration.

type Logging

type Logging struct {
	Enabled    bool   `yaml:"enabled"`
	Provider   string `yaml:"provider"`
	StreamLogs bool   `yaml:"stream_logs"`
	LogPath    string `yaml:"log_path"`
}

Logging represents logging configuration.

type Monitoring

type Monitoring struct {
	Enabled         bool  `yaml:"enabled"`
	CPUThreshold    int   `yaml:"cpu_threshold"`
	MemoryThreshold int   `yaml:"memory_threshold"`
	DiskThreshold   int   `yaml:"disk_threshold"`
	Alert           Alert `yaml:"alert"`
}

Monitoring represents monitoring configuration.

type Repository

type Repository struct {
	URL           string `yaml:"url"`
	Branch        string `yaml:"branch"`
	AutoDeploy    bool   `yaml:"auto_deploy"`
	WebhookSecret string `yaml:"webhook_secret"`
}

Repository represents Git repository settings.

type SSL

type SSL struct {
	Enabled   bool   `yaml:"enabled"`
	Provider  string `yaml:"provider"`
	Email     string `yaml:"email"`
	AutoRenew bool   `yaml:"auto_renew"`
}

SSL represents SSL configuration.

type Server

type Server struct {
	Host    string `yaml:"host"`
	User    string `yaml:"user"`
	SSHKey  string `yaml:"ssh_key"`
	UseSudo bool   `yaml:"use_sudo"`
}

type Storage

type Storage struct {
	Provider string `yaml:"provider"`
	Bucket   string `yaml:"bucket"`
	Region   string `yaml:"region"`
	// #nosec G117
	AccessKey string `yaml:"access_key"`
	SecretKey string `yaml:"secret_key"`
}

type Webhook

type Webhook struct {
	OnSuccess []string `yaml:"on_success"`
	OnFailure []string `yaml:"on_failure"`
}

Webhook represents webhook configuration.

Jump to

Keyboard shortcuts

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