config: Remove erronous yaml entries
This commit is contained in:
parent
7371cc2163
commit
840efd5c03
8 changed files with 13 additions and 14 deletions
|
|
@ -12,16 +12,16 @@ type ListenConfig struct {
|
|||
// This should typically be port 80 and port 443.
|
||||
Ports []uint16 `yaml:"ports" default:"80" validate:"ports"`
|
||||
|
||||
// AdvertisedSSHPort is the port that shows up as the ssh port in various places in the interface.
|
||||
// SSHPort is the port that shows up as the ssh port in various places in the interface.
|
||||
// It is automaticalled added to the ports to listen to.
|
||||
AdvertisedSSHPort uint16 `yaml:"advertise_ssh" default:"80" validate:"port"`
|
||||
SSHPort uint16 `yaml:"ssh" default:"80" validate:"port"`
|
||||
}
|
||||
|
||||
// ComposePorts returns a list of ports to be used within a docker-compose.yml file.
|
||||
// These can be used to forward all ports to the internal port.
|
||||
func (lc ListenConfig) ComposePorts(internal string) []string {
|
||||
// sort and uniquify ports
|
||||
ports := append([]uint16{lc.AdvertisedSSHPort}, lc.Ports...)
|
||||
ports := append([]uint16{lc.SSHPort}, lc.Ports...)
|
||||
slices.Sort(ports)
|
||||
ports = slices.Compact(ports)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue