* MM-11697: Environment overrides do not overwrite config.json on save #10388 The config store now keeps a copy of the config as loaded from the store without environment overrides. Whenever persisting, we now check if the current setting is different from the loaded setting. If it is, then use the loaded setting instead. As described in the comments to `removeEnvOverrides` in `common.go`, this behavior will have to change if we ever let the user change a setting that has been environmentally overriden. This was interesting because the `load` function in `common.go` also persists, so we have to tee the provided `io.ReadCloser` and construct a config that doesn't have the environment overrides. And then we have to find the path to the (maybe) changed variable in the config struct using reflection. Possible WIP: I had to expose a `GetWithoutEnvOverrides` function in the Store interface just for the tests -- this is because the `file_test` and `database_test`s are in the config_test package instead of the `config` package. * added function documentation * fixed a small problem with tests * MM-11697: big cleanup based on Jesse's PR comments * MM-11697: edits per PR feedback * MM-11697: licence header * MM-11697: now testing that on disk config is not changed by env overrides * MM-11697: remove unneeded exports
Mattermost is an open source, private cloud, Slack-alternative from https://mattermost.org.
It's written in Golang and React and runs as a single Linux binary with MySQL or PostgreSQL. Every month on the 16th a new compiled version is released under an MIT license.
Try out Mattermost
- Join the Mattermost Contributor's server (latest nightly builds, unstable)
- Join the Mattermost Demo server (latest stable version)
Deploy on Heroku
Note: Heroku preview does not include email or persistent storage
Deploy on a Cloud Platform via Bitnami
Auto-deploy Mattermost to Amazon Web Services, Azure, Google Cloud Platform, or Oracle Cloud Platform via Bitnami.
Install on Your Own Machine
- One-line Docker Preview
- Developer Machine Setup
- Production Install Guides using Linux Binary
- Production Docker Install
Native Mobile and Desktop Apps
In addition to the web interface, you can also download Mattermost clients for Android, iOS, Windows PC, Mac OSX, and Linux.
Get Security Bulletins
Receive notifications of critical security updates. The sophistication of online attackers is perpetually increasing. If you are deploying Mattermost it is highly recommended you subscribe to the Mattermost Security Bulletin mailing list for updates on critical security releases.
Get Involved
- Contribute Code
- Find "Help Wanted" projects
- Join Developer Discussion on a Mattermost Server for contributors
- File Bugs
- Share Feature Ideas
- Get Troubleshooting Help
- Help translate Mattermost
Learn More
- API Options - webhooks, slash commands, drivers and web service
- See who's using Mattermost
- Browse over 700 Mattermost integrations
Get the Latest News
- Twitter - Follow Mattermost
- Blog - Get the latest updates from the Mattermost blog.
- Email - Subscribe to our newsletter (1 or 2 per month)
- IRC - Join the #matterbridge channel on Freenode (thanks to matterircd)
Any other questions, mail us at info@mattermost.com. We’d love to meet you!





