config: Remove erronous yaml entries
This commit is contained in:
parent
7371cc2163
commit
840efd5c03
8 changed files with 13 additions and 14 deletions
|
|
@ -4,8 +4,8 @@ listen:
|
|||
ports: null
|
||||
|
||||
# The ssh port that is shown to the user in various interfaces.
|
||||
# This port is not automatically included in the ports to listen to.
|
||||
advertise_ssh: null
|
||||
# This port is automatically included in the ports to listen to.
|
||||
ssh: null
|
||||
|
||||
paths:
|
||||
# A WissKI Distillery needs to store a lot of data on disk.
|
||||
|
|
@ -79,7 +79,6 @@ triplestore:
|
|||
# The default here is 720hours (== 30 days)
|
||||
age: null
|
||||
|
||||
|
||||
# Various components use password-based-authentication.
|
||||
# These passwords are generated automatically.
|
||||
# This variable can be used to determine their length.
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ func (legacy *Legacy) Migrate(cfg *config.Config) error {
|
|||
if legacy.CertbotEmail != "" {
|
||||
cfg.Listen.Ports = append(cfg.Listen.Ports, 443)
|
||||
}
|
||||
cfg.Listen.AdvertisedSSHPort = legacy.PublicSSHPort
|
||||
cfg.Listen.SSHPort = legacy.PublicSSHPort
|
||||
cfg.TS.AdminUsername = legacy.TriplestoreAdminUser
|
||||
cfg.TS.AdminPassword = legacy.TriplestoreAdminPassword
|
||||
cfg.SQL.AdminUsername = legacy.MysqlAdminUser
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -80,8 +80,8 @@ func (tpl *Template) SetDefaults() (err error) {
|
|||
func (tpl Template) Generate() Config {
|
||||
return Config{
|
||||
Listen: ListenConfig{
|
||||
Ports: []uint16{80},
|
||||
AdvertisedSSHPort: 80,
|
||||
Ports: []uint16{80},
|
||||
SSHPort: 80,
|
||||
},
|
||||
Paths: PathsConfig{
|
||||
Root: tpl.RootPath,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue