diff --git a/cmd/photoprism/photoprism.go b/cmd/photoprism/photoprism.go index 48e35c2f1..6afbc1a68 100644 --- a/cmd/photoprism/photoprism.go +++ b/cmd/photoprism/photoprism.go @@ -52,10 +52,10 @@ func main() { EnvVar: "PHOTOPRISM_SERVER_PORT", }, cli.StringFlag{ - Name: "server-ip, i", - Usage: "HTTP server IP address (optional)", + Name: "server-host, h", + Usage: "HTTP server host", Value: "", - EnvVar: "PHOTOPRISM_SERVER_IP", + EnvVar: "PHOTOPRISM_SERVER_HOST", }, cli.StringFlag{ Name: "server-mode, m", @@ -67,8 +67,8 @@ func main() { Action: func(context *cli.Context) error { conf := photoprism.NewConfig(context) - if context.IsSet("server-ip") || conf.ServerIP == "" { - conf.ServerIP = context.String("server-ip") + if context.IsSet("server-host") || conf.ServerIP == "" { + conf.ServerIP = context.String("server-host") } if context.IsSet("server-port") || conf.ServerPort == 0 { @@ -89,7 +89,7 @@ func main() { conf.MigrateDb() - fmt.Printf("Starting web server at port %d...\n", context.Int("server-port")) + fmt.Printf("Starting web server at %s:%d...\n", context.String("server-host"), context.Int("server-port")) server.Start(conf) diff --git a/configs/photoprism.yml b/configs/photoprism.yml index 7275cda87..ddad605a2 100644 --- a/configs/photoprism.yml +++ b/configs/photoprism.yml @@ -5,7 +5,7 @@ thumbnails-path: /var/photoprism/thumbnails originals-path: /var/photoprism/photos/originals import-path: /var/photoprism/photos/import export-path: /var/photoprism/photos/export -server-ip: +server-host: server-mode: release server-port: 80 database-driver: mysql diff --git a/internal/photoprism/config.go b/internal/photoprism/config.go index 589d9954f..8988dc81e 100644 --- a/internal/photoprism/config.go +++ b/internal/photoprism/config.go @@ -55,7 +55,7 @@ func (c *Config) SetValuesFromFile(fileName string) error { c.Debug = debug } - if serverIP, err := yamlConfig.Get("server-ip"); err == nil { + if serverIP, err := yamlConfig.Get("server-host"); err == nil { c.ServerIP = serverIP }