Summary
I’m deploying MatterMost using docker-compose in my Terra-Master NAS. I installed docker, docker-compose(docker manager) and created docker-compose.yml following the instruction step-by-step(I’m not using HTTPS/SSO so I skipped step 4&5).
After I deployed MM, I found out that all environment variables set up in docker-compose.yml didn’t work. I looked into the config.yml, all arguments were default values. But if I change the config in MM website, the config.yml changes too, so the problem is MM server didn’t get the environment variables correctly. However, when I docker inspect <mattermost> I can see all the environment variables setting in docker-compose.yml. It seems that MM server doesn’t take the environment variables properly.
Hi Alston! It sounds like you’re on the right track with your Docker setup. To ensure that environment variables are properly passed to the Mattermost server, you may want to verify that the MM_ENVIRONMENT settings are correct in your docker-compose.yml file and check out the Mattermost environment variables documentation for additional guidance. Let us know if this helps!
Hi Alston! Thanks for sharing your docker-compose.yml file. It looks like the environment variables are correctly set up, so the issue might be related to how Mattermost is reading these variables. You can try adding the MM_CONFIG environment variable to the Mattermost service to explicitly point to your configuration file like this:
It sounds like you’ve set everything up correctly with your docker-compose.yml, but MatterMost isn’t picking up the environment variables as expected. One possibility is that MatterMost may be prioritizing the settings in config.yml over the environment variables from your docker-compose file. You could try setting "Enable configuration via environment variables" to true in your config.json file to ensure that environment variables are being properly recognized.
Also, make sure you’re using the right format for the variables and check the logs for any errors during the startup process. Another potential fix is to restart the container after making changes to ensure the environment variables take effect. Let us know how it goes!