mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-14 03:07:24 +03:00
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 == "" {
|
||||
Server.DbPath = filepath.Join(Server.DataFolder, "navidrome.db")
|
||||
}
|
||||
if os.Getenv("PORT") != "" {
|
||||
Server.Port = os.Getenv("PORT")
|
||||
}
|
||||
log.SerLevelString(Server.LogLevel)
|
||||
log.Trace("Loaded configuration", "file", confFile, "config", fmt.Sprintf("%#v", Server))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user