Just want to describe my setup to run Mattermost using the Docker setup together with nginx-proxy in front of Mattermost. Since v3.7.1 the Mattermost Docker setup creates it's own network for communication between containers. nginx-proxy needs to know about this network. That means you need to find the network and connect it to nginx-proxy:
docker network ls
# Grep the name of your Mattermost network like "mymattermost_default".
docker network connect mymattermost_default nginx-proxy
Now restart the Mattermost app container (or web if using it) to get nginx-proxy configured correctly:
docker-compose stop app
docker-compose start app
BTW: With nginx-proxy there is no need to run the web container. My docker-compose.yml looks like this:
# uncomment the following to enable backup
# - AWS_ACCESS_KEY_ID=XXXX
# - AWS_SECRET_ACCESS_KEY=XXXX
# - WALE_S3_PREFIX=s3://BUCKET_NAME/PATH
# - AWS_REGION=us-east-1
# in case your config is not in default location
# - MM_CONFIG=/mattermost/config/config.jso
# comment out for team edition
# set same as db credentials and dbname
- Important changes are the VIRTUAL_HOST environment variable and the expose directive which tells nginx-proxy where to connect to the Mattermost backend.
- I'm using the LetsEncrypt companion container for nginx-proxy for automatic Let's Encrypt certs.
- You may customize the nginx-proxy settings as described at their Github page (can not post the link because as new user to this forum I'm not allowed to post mor than 2 links). For instance the Mattermost nginx is configured with
- The network needs to be connected manually this way. To automatize this you may create a independent network before and use it together with nginx-proxy. See docker-compose documentation regarding using external networks.