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
commitbe61bfe0e918470a3df73834659c8b8a97a5d734 (patch)
tree857433f3e479dcc2e59bb24b656088246df9c7da /utils/config.go
parent6315af920a8ba696834d163dab3d3be85b680973 (diff)
parente9040749bdcb1d1bcb7fdd199e27fbe69c1f07ec (diff)
downloadchat-be61bfe0e918470a3df73834659c8b8a97a5d734.tar.gz
chat-be61bfe0e918470a3df73834659c8b8a97a5d734.tar.bz2
chat-be61bfe0e918470a3df73834659c8b8a97a5d734.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