Skip to content
Production Docker/Kubernetes setup for Mattermost
Shell
Find file
Pull request Compare This branch is 10 commits ahead, 4 commits behind npcode:master.
Latest commit 9f9a3fb @mfburnett mfburnett Merge pull request #1 from redspread/mfburnett-patch-1
Update README.md

README.md

kube-mattermost

Quickstart

This assumes you have a running Kubernetes cluster.

  1. Install Spread with $ brew tap redspread/spread then $ brew install spread
  2. Clone Mattermost, the open source Slack $ git clone http://github.com/redspread/kube-mattermost
  3. Deploy Mattermost to Kubernetes: $ spread deploy .
  4. Grab the public IP and put it in your browser to see your self-hosted app!

Recommended for Production

Run spread deploy to update the cluster after making changes.

Customize image (email + other settings)

  1. Enable email in config.template.json.
  2. Build image (docker build -t "youruser/yourrepo:sometag" .)
  3. Push image (docker push youruser/yourrepo:sometag)
  4. Replace the Image field in mattermost.ctr with your image name (youruser/yourrepo:sometag)

Use persistent volume

Unless a persistent volume is used, the data stored in postgres will be lost if for any reason the postgres container stops running.

  1. Create persistent disks
    Google:
    gcloud compute disks create --size=30GB mattermost-postgres
    gcloud compute disks create --size=30GB mattermost-assets
  2. Un-comment the appropriate volume sections in app/rc.yml and db/rc.yml

Set database password

  1. Set Postgres username and password in .k2e/secret.yaml.

Note: Secret data values are base64 encoded.

Notes: The volume sizes are suggested, but you can change them to whatever you'd like.

Troubleshooting

Make sure kubectl is set to the correct project, cluster, and zone. For those using Google, here's a cheat sheet to common gcloud errors (auth login, project, zone, and cluster).

Here's the original Dockerfile and docker-compose setup by @npcode.

Something went wrong with that request. Please try again.