summaryrefslogtreecommitdiffstats
path: root/utils/config.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2015-06-16 13:50:22 -0800
committerCorey Hulen <corey@hulen.com>2015-06-16 13:50:22 -0800
commit521cb015c43010231d7de5895b5a41ef8fb6991f (patch)
tree557475011f8776bc65ece75d065cf8c4924ac56f /utils/config.go
parentf937fa0d9cc5fb8e63c95b53ceea8665c35a8125 (diff)
parent2f2aded178c161f7688f295231605711806c7f64 (diff)
downloadchat-521cb015c43010231d7de5895b5a41ef8fb6991f.tar.gz
chat-521cb015c43010231d7de5895b5a41ef8fb6991f.tar.bz2
chat-521cb015c43010231d7de5895b5a41ef8fb6991f.zip
Merge pull request #15 from mattermost/enviroment-override
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