Enable passing in local IP, refactored IP detection (#48)
* Enable passing in local IP, refactored IP detection * update docker server instructions
This commit is contained in:
+8
-11
@@ -53,6 +53,11 @@ func main() {
|
||||
Usage: "api keys (key: secret\\n)",
|
||||
EnvVars: []string{"LIVEKIT_KEYS"},
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "node-ip",
|
||||
Usage: "IP address of the current node, used to advertise to clients. Automatically determined by default",
|
||||
EnvVars: []string{"NODE_IP"},
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "redis-host",
|
||||
Usage: "host (incl. port) to redis server",
|
||||
@@ -130,15 +135,7 @@ func getConfig(c *cli.Context) (*config.Config, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
conf, err := config.NewConfig(confString)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if err = conf.UpdateFromCLI(c); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return conf, nil
|
||||
return config.NewConfig(confString, c)
|
||||
}
|
||||
|
||||
func startServer(c *cli.Context) error {
|
||||
@@ -177,8 +174,8 @@ func startServer(c *cli.Context) error {
|
||||
defer func() {
|
||||
// run memory profile at termination
|
||||
runtime.GC()
|
||||
pprof.WriteHeapProfile(f)
|
||||
f.Close()
|
||||
_ = pprof.WriteHeapProfile(f)
|
||||
_ = f.Close()
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user