Mattermost OSS (team) edition.
335
** This repo still a WIP**
This project enables deployment of a Mattermost server in a multi-node production configuration using Docker.
Notes:
The following instructions deploy Mattermost in a production configuration using multi-node Docker Compose set up.
Make sure to set the appropriate values for MM_USERNAME, MM_PASSWORD and MM_DBNAME.
Put your SSL certificate as ./volumes/web/cert/cert.pem and the private key that has
no password as ./volumes/web/cert/key-no-password.pem. If you don't have
them you may generate a self-signed SSL certificate.
Build and run mattermost
docker-compose up -d
https://your.domain with your web browser.docker-compose up -d
http://your.domain with your web browser.docker-compose start
docker-compose stop
Make sure to backup Mattermost data before proceeding.
docker-compose down
git pull
docker-compose build
docker-compose up -d
docker-compose stop && docker-compose rm
sudo rm -rf volumes
When AWS S3 environment variables are specified on db docker container, it enables Wal-E backup to S3.
docker run -d --name mattermost-db \
-e AWS_ACCESS_KEY_ID=XXXX \
-e AWS_SECRET_ACCESS_KEY=XXXX \
-e WALE_S3_PREFIX=s3://BUCKET_NAME/PATH \
-e AWS_REGION=us-east-1
-v ./volumes/db/var/lib/postgresql/data:/var/lib/postgresql/data
-v /etc/localtime:/etc/localtime:ro
db
All four environment variables are required. It will enable completed WAL segments sent to archive storage (S3). The base backup and clean up can be done through the following command:
# base backup
docker exec mattermost-db su - postgres sh -c "/usr/bin/envdir /etc/wal-e.d/env /usr/local/bin/wal-e backup-push /var/lib/postgresql/data"
# keep the most recent 7 base backups and remove the old ones
docker exec mattermost-db su - postgres sh -c "/usr/bin/envdir /etc/wal-e.d/env /usr/local/bin/wal-e delete --confirm retain 7"
Those tasks can be executed through a cron job or systemd timer.
Customization can be done through environment variables.
MM_USERNAME: database username, must be the same as one in DB imageMM_PASSWORD: database password, must be the same as one in DB imageMM_DBNAME: database name, must be the same as one in DB imageDB_HOST: database host addressDB_PORT_NUMBER: database portMM_CONFIG: configuration file location. It can be used when config is mounted in a different location.MM_USERNAME: database username, must be the same as on in App imageMM_PASSWORD: database password, must be the same as on in App imageMM_DBNAME: database name, must be the same as on in App imageAWS_ACCESS_KEY_ID: aws access key, used for db backupAWS_SECRET_ACCESS_KEY: aws secret, used for db backupWALE_S3_PREFIX: aws s3 bucket name, used for db backupAWS_REGION: aws region, used for db backupMATTERMOST_ENABLE_SSL: whether to enable SSLPLATFORM_PORT_80_TCP_PORT: port that Mattermost image is listening onYou need to migrate your database before upgrading mattermost to 3.0.x from 2.x. Run these commands in the latest mattermost-docker directory.
docker-compose rm -f app
docker-compose build app
docker-compose run app -upgrade_db_30
docker-compose up -d
See the offical Upgrade Guide for more details.
If you want to know how to use docker-compose, see the overview page.
For the server configurations, see prod-ubuntu.rst of mattermost.
Content type
Image
Digest
Size
112.5 MB
Last updated
about 9 years ago
docker pull jeshan/mattermost-team-edition