Documentation
¶
Overview ¶
Package installer is stackr-install: the form, the checks on every answer, and the docker commands that create the panel on a fresh host (docs/plans/49-installer-binary.md).
Index ¶
- func CheckDataDir(s string) (string, error)
- func CheckEmail(s string) (string, error)
- func CheckHTTPSPort(s, httpPort string, busy func(string) bool) error
- func CheckHost(s, root string) (string, error)
- func CheckPort(s string, busy func(string) bool) error
- func CheckProxies(s string) (string, error)
- func CheckRoot(s string) (string, error)
- func Install(ctx context.Context, a *Answers, img Images, dry bool, out io.Writer) error
- func Main(args []string) int
- func Preflight(ctx context.Context) error
- type Answers
- type Choice
- type Images
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDataDir ¶
CheckDataDir accepts an absolute path that can go into a --mount spec, where a comma would split it.
func CheckEmail ¶
CheckEmail accepts an address Let's Encrypt can write to.
func CheckHTTPSPort ¶
CheckHTTPSPort is CheckPort that also refuses the HTTP port.
func CheckProxies ¶
CheckProxies accepts addresses or ranges separated by commas or spaces, blank for none, and returns them comma joined without repeats.
Types ¶
type Answers ¶
type Answers struct {
// Apps get names under Root (app.stack.org.example.com), the panel its
// own Host under it. Blank Host means stkr.<Root>.
Root string
Host string
Cloudflare bool
Proxies string
HTTPS bool
Email string
HTTPPort string
HTTPSPort string
DataDir string
}
Answers is everything the install needs from the operator. The form and the flags both fill it; Check is the one place that decides it is usable. A domain is not optional: apps are reached by name through traefik, and so is the panel. An install on a bare IP would have no names, no certificates and no route to the panel but a published port, which is a different product, not a flag.
func (*Answers) Check ¶
Check normalises every answer in place and returns the first problem. busy reports a port something already listens on; nil skips that check.