deploy

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DeployYAMLExample = `` /* 470-byte string literal not displayed */

DeployYAMLExample is the default deploy.yaml content for new apps.

Variables

This section is empty.

Functions

func Deploy

func Deploy(dir, target string, cfg *Config) error

Deploy runs the deploy pipeline for the given target.

func DetectGoVersion

func DetectGoVersion(dir string) string

DetectGoVersion reads go version from go.mod.

func EnsureDockerfile

func EnsureDockerfile(dir string) (string, error)

EnsureDockerfile creates a Dockerfile if missing. Returns path.

Types

type Config

type Config struct {
	Target     string         `yaml:"target"`     // fly, railway, aws, kubernetes
	AppName    string         `yaml:"app_name"`   // app name on platform
	Service    string         `yaml:"service"`    // Railway service name (defaults to app_name)
	Region     string         `yaml:"region"`     // primary region (fly, aws)
	Secrets    []string       `yaml:"secrets"`    // env var names to set as secrets (from .env)
	Migrations *bool          `yaml:"migrations"` // run migrations on deploy (default true)
	Workers    []WorkerConfig `yaml:"workers"`    // worker processes (e.g. queue:work)
}

Config holds deploy configuration. Loaded from deploy.yaml.

func LoadConfig

func LoadConfig(dir string) (*Config, error)

Load reads deploy.yaml from dir. Returns nil if file doesn't exist.

func PromptTarget

func PromptTarget(dir string, cfg *Config) (target string, outCfg *Config, err error)

PromptTarget prompts the user to select a deploy target. Returns target and updated config.

type WorkerConfig

type WorkerConfig struct {
	Command string `yaml:"command"` // e.g. "queue:work"
	Scale   int    `yaml:"scale"`   // instance count (0 = same as app)
}

Jump to

Keyboard shortcuts

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