Renamed server-ip to server-host

This commit is contained in:
Michael Mayer 2018-09-18 15:18:54 +02:00
parent 97d5bcf8ce
commit 5e12c48de2
3 changed files with 8 additions and 8 deletions

View File

@ -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)

View File

@ -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

View File

@ -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
}