deployment

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package deployment enters the runtime described by a deployed release. Applications opt in only when neither --config nor --env-file was supplied.

Index

Constants

View Source
const RuntimeDescriptor = "config/deploy-runtime.json"

RuntimeDescriptor is the release-relative deployment descriptor path.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runtime

type Runtime struct {
	Release    string
	Instance   string
	User       string
	ConfigFile string
	EnvFile    string
	WorkDir    string
	PublicDir  string
}

Runtime contains the release profile and the instance's runtime paths. Use Detect to obtain it before calling Enter.

func Detect

func Detect() (Runtime, bool, error)

Detect reads a bounded descriptor beside the resolved executable. An absent descriptor returns ok=false; an invalid or unreadable descriptor returns an error.

func (Runtime) Enter

func (r Runtime) Enter(args []string) error

Enter replaces a root Linux process with runuser and forwards args unchanged (pass os.Args[1:]). Other users enter WorkDir and default WEB__PUBLIC_DIR to PublicDir only when unset. After Enter, load ConfigFile and EnvFile explicitly. A successful root exec never returns. Root on other platforms is unsupported.

Jump to

Keyboard shortcuts

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