Install Mattermost server via Docker
Go to file
Marco Kundt d09edec595 fix enumerations/indentation 2021-04-22 16:14:14 +02:00
contrib/systemd rename default network and create webroot docker volume 2021-04-16 15:56:27 +02:00
docs fix enumerations/indentation 2021-04-22 16:14:14 +02:00
nginx set proxy_http_version to 1.1 2021-04-20 19:28:28 +02:00
scripts escape env variable 2021-04-22 16:00:20 +02:00
.gitignore change paths to old mattermost-docker settings 2021-04-20 20:22:20 +02:00
LICENSE add LICENSE 2021-04-22 15:05:39 +02:00
README.md add readme.md 2021-04-22 16:11:14 +02:00
docker-compose.nginx.yml fix dependencies on containers 2021-04-20 20:23:15 +02:00
docker-compose.without-nginx.yml possibility for using the containers with an external reverse proxy 2021-04-15 14:51:23 +02:00
docker-compose.yml remove MM settings used for testing 2021-04-20 20:23:52 +02:00
env.example add commented paths in case Let's Encrypt will be used 2021-04-22 15:57:59 +02:00

README.md

Mattermost Docker setup

This repository is meant to replace the previous mattermost-docker repository and tries to stay as close as possible to the old one. Migrating will include some steps and while trying to keep it simple the structure changed. To keep it simple all the basic configuration can be done through the .env file.

Prequisites

  1. A Docker installation is needed (https://docs.docker.com/engine/install/)
  2. Docker-compose needs to be >= 1.28 (https://docs.docker.com/compose/install/)

Quick setup

These steps are required for new Mattermost setups and don't include everything needed when already using mattermost-docker.

1. Cloning the repository (as an alternative please download it as archive)

$ git pull https://github.com/mattermost/docker
$ cd docker

2. Create a .env file by copying and adjusting the example file

$ cp env.example .env

3. Create the needed directores and set permissions (this orientates on the previous mattermost-docker structure and the

direcories can be changed in the .env file)

$ mkdir -p ./volumes/app/mattermost/{config,data,logs,plugins,client-plugins}
$ sudo chown -R 2000:2000 ./volumes/app/mattermost

## when using the provided nginx and if a certificate and key already exists
$ mkdir -p ./volumes/web/cert

4. Placing the certificate and key (if using provided nginx)

4.1 Pre-existing certificate and key

$ cp PATH-TO-CERT.PEM ./volumes/web/cert/cert.pem
$ cp PATH-TO-KEY.PEM ./volumes/web/cert/key-no-password.pem

4.2 Let's Encrypt

TODO: add link to Let's Encrypt certificate guide

For using Let's Encrypt you can follow this guide LINK or use the this Bash script scripts/issue-certificate.sh. Both methods requires you to change the path to the Let's Encrypt config folders inside the .env.

$ bash scripts/issue-certificate.sh -d mm.example.com -o ./certs

5. Run docker-compose

5.1 Default (with nginx)

$ sudo docker-compose -f docker-compose.yml -f docker-compose.nginx.yml up -d

5.2. Without nginx (for use behind an existing reverse proxy)

$ sudo docker-compose -f docker-compose.yml -f docker-compose.without-nginx.yml up -d