/kube-mattermost

Production Docker/Kubernetes setup for Mattermost

Primary LanguageShellApache License 2.0Apache-2.0

#kube-mattermost

##Quickstart

This assumes you set up a remote or local Kubernetes cluster.

  1. Install Spread.
  2. Clone Mattermost, the open source Slack $ git clone http://github.com/redspread/kube-mattermost
  3. Deploy Mattermost to your cluster: $ spread deploy .
  4. Grab the IP (remote) or port (local) 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 GKE, 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.