Deploy Mattermost – Render Docs
Introduction
Mattermost is an open source messaging platform with an easy-to-use and familiar web interface. It is customizable and can run as a simple standalone web server or as a complex, clustered, multi-process service connected to separate database, object storage, LDAP directory, search engine, and mail service, among other things. All of these configurations can be installed on Render.
In this tutorial, you'll run a Mattermost instance consisting of a Mattermost web service, a PostgreSQL database, and a MinIO object store backed by a persistent, snapshot disk. Alternatively, if you just want Mattermost up and running, follow the one-click deploy steps.
One-Click Deploy
Click Deploy to Render below and follow the prompts to set up Mattermost on Render.
Manual Deploy
We'll be using github.com/render-examples/mattermost, so start by forking that repository.
Create the Database
Create a new PostgreSQL database on Render.
You'll need various properties from this database when you're creating the Mattermost service.
Create the MinIO Service
- Go here to begin creating a new private service.
- Use the forked Mattermost repository.
- Add these two environment variables:
| Key | Value |
|---|---|
MINIO_ACCESS_KEY |
Supply your own value or generate it |
MINIO_SECRET_KEY |
Supply your own value or generate it |
These values will be needed for the Mattermost service later.
4. Add a disk with /data as the mount path.
5. Set the Docker build context directory to ./minio and the Dockerfile path to ./minio/Dockerfile.
6. Create the service.
Create the Mattermost Service
- Go here to begin creating a new web service.
- Use the forked Mattermost repository.
- Add the following environment variables:
| Key | Value |
|---|---|
MM_SQLSETTINGS_DRIVERNAME |
postgres |
MM_USERNAME |
The username from the database created earlier |
MM_PASSWORD |
The password from the database created earlier |
MM_DBNAME |
The database name from the database created earlier |
DB_HOST |
The hostname from the database created earlier |
MM_FILESETTINGS_DRIVERNAME |
amazons3 |
MM_FILESETTINGS_AMAZONS3BUCKET |
mattermost |
MM_FILESETTINGS_AMAZONS3ACCESSKEYID |
The MINIO_ACCESS_KEY from MinIO created earlier |
MM_FILESETTINGS_AMAZONS3SECRETACCESSKEY |
The MINIO_SECRET_KEY from MinIO created earlier |
MM_FILESETTINGS_AMAZONS3ENDPOINT |
The host:port from the MinIO created earlier |
MM_FILESETTINGS_AMAZONS3SSL |
false |
- Add a disk with
/mattermost/configas the mount path. - Set the Docker build context directory to
./appand the Dockerfile path to./app/Dockerfile. - Create the service.
Your Mattermost cluster should be ready to use with regular backups and disk snapshots!