GithubHelp home page GithubHelp logo

loretoparisi / mattermost-docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mattermost/mattermost-docker

0.0 3.0 0.0 80 KB

Dockerfile for mattermost in production

License: Apache License 2.0

Shell 100.00%

mattermost-docker's Introduction

Dockerfiles for Mattermost in production

See README.aws.md if you want to install it on AWS Elastic Beanstalk.

Build Status

Requirements

Installation

Install with SSL certificate

  1. Open docker-compose.yml and set MATTERMOST_ENABLE_SSL to true.

    environment:
      - MATTERMOST_ENABLE_SSL=true
    
  2. 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.

  3. Build and run mattermost

    docker-compose up -d

  4. Open https://your.domain with your web browser.

Install without SSL certificate

  1. Open docker-compose.yml and set MATTERMOST_ENABLE_SSL to false.

    environment:
      - MATTERMOST_ENABLE_SSL=false
    
  2. Build and run mattermost

    docker-compose up -d

  3. Open http://your.domain with your web browser.

Starting/Stopping

Start

docker-compose start

Stop

docker-compose stop

Removing

Remove the containers

docker-compose stop && docker-compose rm

Remove the data and settings of your mattermost instance

sudo rm -rf volumes

Database Backup

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.

Upgrading to Team Edition 3.0.x from 2.x

You 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.

Known Issues

  • Do not modify the Listen Address in Service Settings.
  • Rarely 'app' container fails to start because of "connection refused" to database. Workaround: Restart the container.

More informations

If you want to know how to use docker-compose, see the overview page.

If you want to run Mattermost on Kubernetes you can start with the manifest examples in the kubernetes folder

For the server configurations, see prod-ubuntu.rst of mattermost.

mattermost-docker's People

Contributors

eungjun-yi avatar rothgar avatar xcompass avatar codecraf8 avatar em-ak avatar fmaker avatar jasonblais avatar pierreozoux avatar it33 avatar

Watchers

Loreto Parisi avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.