feat: PORT env var can override configured port
This commit is contained in:
parent
b7d7251cf4
commit
ac4aa1ebe2
|
@ -84,6 +84,9 @@ func LoadFromFile(confFile string, skipFlags ...bool) {
|
||||||
if Server.DbPath == "" {
|
if Server.DbPath == "" {
|
||||||
Server.DbPath = filepath.Join(Server.DataFolder, "navidrome.db")
|
Server.DbPath = filepath.Join(Server.DataFolder, "navidrome.db")
|
||||||
}
|
}
|
||||||
|
if os.Getenv("PORT") != "" {
|
||||||
|
Server.Port = os.Getenv("PORT")
|
||||||
|
}
|
||||||
log.SerLevelString(Server.LogLevel)
|
log.SerLevelString(Server.LogLevel)
|
||||||
log.Trace("Loaded configuration", "file", confFile, "config", fmt.Sprintf("%#v", Server))
|
log.Trace("Loaded configuration", "file", confFile, "config", fmt.Sprintf("%#v", Server))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue