summaryrefslogtreecommitdiffstats
path: root/utils/config.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-06-16 17:05:23 -0400
committerChristopher Speller <crspeller@gmail.com>2015-06-16 17:05:23 -0400
commite9040749bdcb1d1bcb7fdd199e27fbe69c1f07ec (patch)
tree3c839bae149d18dc581710eaf03932358c9d77d4 /utils/config.go
parentfdb3f152748a3590516e53fd3864eb91d3b62bbb (diff)
downloadchat-e9040749bdcb1d1bcb7fdd199e27fbe69c1f07ec.tar.gz
chat-e9040749bdcb1d1bcb7fdd199e27fbe69c1f07ec.tar.bz2
chat-e9040749bdcb1d1bcb7fdd199e27fbe69c1f07ec.zip
Allow for setting of domain with enviroment variable
Diffstat (limited to 'utils/config.go')
-rw-r--r--utils/config.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/config.go b/utils/config.go
index 76e6060be..745887c70 100644
--- a/utils/config.go
+++ b/utils/config.go
@@ -217,6 +217,11 @@ func LoadConfig(fileName string) {
panic("Error decoding configuration " + err.Error())
}
+ // Grabs the domain from enviroment variable if not in configuration
+ if config.ServiceSettings.Domain == "" {
+ config.ServiceSettings.Domain = os.Getenv("MATTERMOST_DOMAIN")
+ }
+
configureLog(config.LogSettings)
Cfg = &config