kube-mattermost
Quickstart
This assumes you have a running Kubernetes cluster.
- Install Spread with
$ brew tap redspread/spread
then$ brew install spread
- Clone Mattermost, the open source Slack
$ git clone http://github.com/redspread/kube-mattermost
- Deploy Mattermost to Kubernetes:
$ spread deploy .
- 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)
- Enable email in
config.template.json
. - Build image (
docker build -t "youruser/yourrepo:sometag" .
) - Push image (
docker push youruser/yourrepo:sometag
) - 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.
- Create persistent disks
Google:
gcloud compute disks create --size=30GB mattermost-postgres
gcloud compute disks create --size=30GB mattermost-assets
- Un-comment the appropriate volume sections in
app/rc.yml
anddb/rc.yml
Set database password
- 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.