From 67f7af1b816407757d08c1de50923dbc5f17e422 Mon Sep 17 00:00:00 2001 From: Burke Mamlin Date: Tue, 7 Jul 2020 11:43:26 -0400 Subject: [PATCH] Added documentation for use of environment variables in config --- Gateway-config-(basic).md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/Gateway-config-(basic).md b/Gateway-config-(basic).md index f0bc408..de9b35b 100644 --- a/Gateway-config-(basic).md +++ b/Gateway-config-(basic).md @@ -12,4 +12,28 @@ account="protocol2.myprotocol2" channel="protocol2channel" ``` -See [[Gateway-config-(channel-rules)]] to see how ```protocolchannel``` or ```protocol2channel``` should be defined. \ No newline at end of file +See [[Gateway-config-(channel-rules)]] to see how ```protocolchannel``` or ```protocol2channel``` should be defined. + +### Environment variables + +Environment variables can be used to override configuration settings, using the form: + +`MATTERBRIDGE_PROTOCOL_ACCOUNT_KEY` + +This can be useful to protect secrets when using [[docker|Deploy: Docker]]. For example, you can override this config: + +``` +[mattermost] + [mattermost.work] + Team="yourteam" + Login="yourlogin" + Password="yourpass" +``` + +by using environment variables: + +``` +MATTERBRIDGE_MATTERMOST_WORK_TEAM="newteam" +MATTERBRIDGE_MATTERMOST_WORK_LOGIN="newlogin" +MATTERBRIDGE_MATTERMOST_WORK_PASSWORD="newpassword" +``` \ No newline at end of file