Skip to content

Instantly share code, notes, and snippets.

@gjedeer
Created June 23, 2020 15:49
Show Gist options
  • Save gjedeer/909a575ba40e45e552ae767aaa3cbbcc to your computer and use it in GitHub Desktop.
Save gjedeer/909a575ba40e45e552ae767aaa3cbbcc to your computer and use it in GitHub Desktop.
Mattermost docker-compose file without building, with ephemeral storage only - for testing. Starts in a minute from "docker-compose up"
version: "3"
services:
db:
image: mattermost/mattermost-prod-db
read_only: true
restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime:ro
environment:
- POSTGRES_USER=mmuser
- POSTGRES_PASSWORD=mmuser_password
- POSTGRES_DB=mattermost
# uncomment the following to enable backup
# - AWS_ACCESS_KEY_ID=XXXX
# - AWS_SECRET_ACCESS_KEY=XXXX
# - WALE_S3_PREFIX=s3://BUCKET_NAME/PATH
# - AWS_REGION=us-east-1
app:
image: mattermost/mattermost-prod-app
restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime:ro
# When you want to use SSO with GitLab, you have to add the cert pki chain of GitLab inside Alpine
# to avoid Token request failed: certificate signed by unknown authority (link: https://github.com/mattermost/mattermost-server/issues/13059)
# - <path_to_your_gitlab_pki>/pki_chain.pem:/etc/ssl/certs/pki_chain.pem:ro
environment:
# set same as db credentials and dbname
- MM_USERNAME=mmuser
- MM_PASSWORD=mmuser_password
- MM_DBNAME=mattermost
# use the credentials you've set above, in the format:
# MM_SQLSETTINGS_DATASOURCE=postgres://${MM_USERNAME}:${MM_PASSWORD}@db:5432/${MM_DBNAME}?sslmode=disable&connect_timeout=10
- MM_SQLSETTINGS_DATASOURCE=postgres://mmuser:mmuser_password@db:5432/mattermost?sslmode=disable&connect_timeout=10
# in case your config is not in default location
#- MM_CONFIG=/mattermost/config/config.json
web:
image: mattermost/mattermost-prod-web
ports:
- "80:80"
- "443:443"
read_only: true
restart: unless-stopped
volumes:
# This directory must have cert files if you want to enable SSL
- /etc/localtime:/etc/localtime:ro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment