2019-09-16 17:40:23 +02:00
|
|
|
version: "3"
|
2016-12-20 09:13:02 +01:00
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
|
|
db:
|
|
|
|
build: db
|
2018-04-15 19:33:49 +02:00
|
|
|
read_only: true
|
2017-02-23 22:30:41 +01:00
|
|
|
restart: unless-stopped
|
2016-12-20 09:13:02 +01:00
|
|
|
volumes:
|
|
|
|
- ./volumes/db/var/lib/postgresql/data:/var/lib/postgresql/data
|
|
|
|
- /etc/localtime:/etc/localtime:ro
|
|
|
|
environment:
|
2017-02-23 22:32:24 +01:00
|
|
|
- POSTGRES_USER=mmuser
|
|
|
|
- POSTGRES_PASSWORD=mmuser_password
|
|
|
|
- POSTGRES_DB=mattermost
|
2017-03-13 23:26:45 +01:00
|
|
|
# uncomment the following to enable backup
|
2016-12-20 09:13:02 +01:00
|
|
|
# - AWS_ACCESS_KEY_ID=XXXX
|
|
|
|
# - AWS_SECRET_ACCESS_KEY=XXXX
|
|
|
|
# - WALE_S3_PREFIX=s3://BUCKET_NAME/PATH
|
|
|
|
# - AWS_REGION=us-east-1
|
|
|
|
|
|
|
|
app:
|
2020-04-01 11:46:36 +02:00
|
|
|
build:
|
|
|
|
context: app
|
|
|
|
# uncomment following lines for team edition or change UID/GID
|
2017-09-24 22:25:47 +02:00
|
|
|
# args:
|
|
|
|
# - edition=team
|
2018-04-15 19:33:49 +02:00
|
|
|
# - PUID=1000
|
|
|
|
# - PGID=1000
|
2021-03-21 10:17:41 +01:00
|
|
|
# - MM_VERSION=5.31
|
2017-02-23 22:30:41 +01:00
|
|
|
restart: unless-stopped
|
2016-12-20 09:13:02 +01:00
|
|
|
volumes:
|
|
|
|
- ./volumes/app/mattermost/config:/mattermost/config:rw
|
|
|
|
- ./volumes/app/mattermost/data:/mattermost/data:rw
|
2017-02-23 06:09:53 +01:00
|
|
|
- ./volumes/app/mattermost/logs:/mattermost/logs:rw
|
2018-08-22 14:47:58 +02:00
|
|
|
- ./volumes/app/mattermost/plugins:/mattermost/plugins:rw
|
2019-01-11 19:21:51 +01:00
|
|
|
- ./volumes/app/mattermost/client-plugins:/mattermost/client/plugins:rw
|
2016-12-20 09:13:02 +01:00
|
|
|
- /etc/localtime:/etc/localtime:ro
|
2020-05-13 17:17:48 +02:00
|
|
|
# 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
|
2017-02-03 09:00:01 +01:00
|
|
|
environment:
|
2017-02-23 22:32:24 +01:00
|
|
|
# set same as db credentials and dbname
|
2017-02-03 09:00:01 +01:00
|
|
|
- MM_USERNAME=mmuser
|
|
|
|
- MM_PASSWORD=mmuser_password
|
|
|
|
- MM_DBNAME=mattermost
|
2019-11-06 14:59:16 +01:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2017-06-23 14:57:51 +02:00
|
|
|
# in case your config is not in default location
|
|
|
|
#- MM_CONFIG=/mattermost/config/config.json
|
2016-12-20 09:13:02 +01:00
|
|
|
|
|
|
|
web:
|
|
|
|
build: web
|
|
|
|
ports:
|
2021-05-05 09:05:09 +02:00
|
|
|
- "80:8080"
|
|
|
|
- "443:8443"
|
2018-04-15 19:33:49 +02:00
|
|
|
read_only: true
|
2017-02-23 22:30:41 +01:00
|
|
|
restart: unless-stopped
|
2016-12-20 09:13:02 +01:00
|
|
|
volumes:
|
2017-10-26 21:16:09 +02:00
|
|
|
# This directory must have cert files if you want to enable SSL
|
2016-12-20 09:13:02 +01:00
|
|
|
- ./volumes/web/cert:/cert:ro
|
|
|
|
- /etc/localtime:/etc/localtime:ro
|
2021-05-05 09:05:09 +02:00
|
|
|
cap_drop:
|
|
|
|
- ALL
|