Documentation
¶
Overview ¶
Package proxycoexist helps run the dashboard behind a reverse proxy that already owns ports 80 and 443 (Traefik, Caddy, nginx), which is the normal situation on a server migrating off another platform.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Holder ¶
type Holder struct {
Port int `json:"port"`
Container string `json:"container"`
Image string `json:"image"`
Kind Kind `json:"kind,omitempty"`
// NetworkGateway is the host's address on the holder's first network,
// reachable from inside that container.
NetworkGateway string `json:"network_gateway,omitempty"`
}
Holder is a container publishing a host port the ingress would want.
type Kind ¶
type Kind string
Kind is a reverse proxy family we can generate configuration for.
func KindFromImage ¶
KindFromImage guesses the proxy family from a container image name.
type Plan ¶
type Plan struct {
Domain string `json:"domain"`
Proxy Kind `json:"proxy"`
UpstreamURL string `json:"upstream_url"`
NeedsRebind bool `json:"needs_rebind"`
Rebind string `json:"rebind,omitempty"`
Snippet string `json:"snippet"`
SnippetPath string `json:"snippet_path,omitempty"`
Steps []string `json:"steps"`
}
Plan is everything an operator needs to put the dashboard behind a proxy.
func Build ¶
Build returns the plan. listenAddr is the dashboard's current listen address (APP_HTTP_ADDR). gateway is the proxy container's host-side address, empty when the proxy runs on the host itself.
func BuildTarget ¶
BuildTarget is Build for any listener, for example an app's domain to the ingress HTTP port.