add configurable environment value (#1421)
* add configurable prometheus env label * Update pkg/config/config.go Co-authored-by: Mathew Kamkar <578302+matkam@users.noreply.github.com> * Update cmd/server/main.go Co-authored-by: Mathew Kamkar <578302+matkam@users.noreply.github.com> * Update config-sample.yaml Co-authored-by: Mathew Kamkar <578302+matkam@users.noreply.github.com> * set config.Environment value to dev when in dev mode * be more precise for config-sample --------- Co-authored-by: Mathew Kamkar <578302+matkam@users.noreply.github.com>
This commit is contained in:
co-authored by
Mathew Kamkar
parent
4367e93855
commit
1848a21eda
@@ -46,6 +46,7 @@ type Config struct {
|
||||
Port uint32 `yaml:"port"`
|
||||
BindAddresses []string `yaml:"bind_addresses"`
|
||||
PrometheusPort uint32 `yaml:"prometheus_port,omitempty"`
|
||||
Environment string `yaml:"environment,omitempty"`
|
||||
RTC RTCConfig `yaml:"rtc,omitempty"`
|
||||
Redis redisLiveKit.RedisConfig `yaml:"redis,omitempty"`
|
||||
Audio AudioConfig `yaml:"audio,omitempty"`
|
||||
@@ -458,6 +459,10 @@ func NewConfig(confString string, strictMode bool, c *cli.Context, baseFlags []c
|
||||
conf.Logging.Level = "debug"
|
||||
}
|
||||
|
||||
if conf.Development {
|
||||
conf.Environment = "dev"
|
||||
}
|
||||
|
||||
return conf, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user