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 ¶
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 ¶
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 ¶
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.