mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-01 04:12:10 +00:00
Able to set SSH port when install, update Docker docs
This commit is contained in:
parent
1453e91f41
commit
bd1d7d1509
8 changed files with 50 additions and 31 deletions
|
@ -118,6 +118,7 @@ func Install(ctx *middleware.Context) {
|
|||
}
|
||||
|
||||
form.Domain = setting.Domain
|
||||
form.SSHPort = setting.SSHPort
|
||||
form.HTTPPort = setting.HttpPort
|
||||
form.AppUrl = setting.AppUrl
|
||||
|
||||
|
@ -241,6 +242,13 @@ func InstallPost(ctx *middleware.Context, form auth.InstallForm) {
|
|||
cfg.Section("server").Key("HTTP_PORT").SetValue(form.HTTPPort)
|
||||
cfg.Section("server").Key("ROOT_URL").SetValue(form.AppUrl)
|
||||
|
||||
if form.SSHPort == 0 {
|
||||
cfg.Section("server").Key("DISABLE_SSH").SetValue("true")
|
||||
} else {
|
||||
cfg.Section("server").Key("DISABLE_SSH").SetValue("false")
|
||||
cfg.Section("server").Key("SSH_PORT").SetValue(com.ToStr(form.SSHPort))
|
||||
}
|
||||
|
||||
if len(strings.TrimSpace(form.SMTPHost)) > 0 {
|
||||
cfg.Section("mailer").Key("ENABLED").SetValue("true")
|
||||
cfg.Section("mailer").Key("HOST").SetValue(form.SMTPHost)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue