2021-04-12 12:18:38 +00:00
|
|
|
# https://docs.docker.com/compose/environment-variables/
|
|
|
|
|
2021-05-21 12:41:34 +00:00
|
|
|
version: "2.4"
|
2021-02-25 15:51:58 +00:00
|
|
|
|
|
|
|
services:
|
|
|
|
postgres:
|
|
|
|
container_name: postgres_mattermost
|
2021-04-12 12:05:15 +00:00
|
|
|
image: postgres:${POSTGRES_IMAGE_TAG}
|
2021-04-12 13:02:03 +00:00
|
|
|
restart: ${RESTART_POLICY}
|
2021-05-21 12:41:34 +00:00
|
|
|
security_opt:
|
|
|
|
- no-new-privileges:true
|
|
|
|
pids_limit: 100
|
|
|
|
read_only: true
|
|
|
|
tmpfs:
|
|
|
|
- /tmp
|
|
|
|
- /var/run/postgresql
|
2021-02-25 15:51:58 +00:00
|
|
|
volumes:
|
|
|
|
- ${POSTGRES_DATA_PATH}:/var/lib/postgresql/data
|
|
|
|
environment:
|
2021-04-12 12:40:45 +00:00
|
|
|
# timezone inside container
|
2021-10-13 05:59:44 +00:00
|
|
|
- TZ
|
2021-04-12 12:40:45 +00:00
|
|
|
|
2021-10-11 13:27:19 +00:00
|
|
|
# necessary Postgres options/variables
|
2021-02-25 15:51:58 +00:00
|
|
|
- POSTGRES_USER
|
|
|
|
- POSTGRES_PASSWORD
|
|
|
|
- POSTGRES_DB
|
|
|
|
|
|
|
|
mattermost:
|
|
|
|
depends_on:
|
|
|
|
- postgres
|
|
|
|
container_name: mattermost
|
2021-04-12 12:05:15 +00:00
|
|
|
image: mattermost/${MATTERMOST_IMAGE}:${MATTERMOST_IMAGE_TAG}
|
2021-04-12 13:02:03 +00:00
|
|
|
restart: ${RESTART_POLICY}
|
2021-05-21 12:41:34 +00:00
|
|
|
security_opt:
|
|
|
|
- no-new-privileges:true
|
|
|
|
pids_limit: 200
|
2021-09-28 11:58:35 +00:00
|
|
|
read_only: ${MATTERMOST_CONTAINER_READONLY}
|
2021-05-21 12:41:34 +00:00
|
|
|
tmpfs:
|
|
|
|
- /tmp
|
2021-02-25 15:51:58 +00:00
|
|
|
volumes:
|
2021-04-12 11:24:32 +00:00
|
|
|
- ${MATTERMOST_CONFIG_PATH}:/mattermost/config:rw
|
|
|
|
- ${MATTERMOST_DATA_PATH}:/mattermost/data:rw
|
|
|
|
- ${MATTERMOST_LOGS_PATH}:/mattermost/logs:rw
|
|
|
|
- ${MATTERMOST_PLUGINS_PATH}:/mattermost/plugins:rw
|
2021-07-27 11:00:44 +00:00
|
|
|
- ${MATTERMOST_CLIENT_PLUGINS_PATH}:/mattermost/client/plugins:rw
|
2021-12-17 11:50:17 +00: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 and https://github.com/mattermost/docker/issues/34)
|
|
|
|
# - ${GITLAB_PKI_CHAIN_PATH}:/etc/ssl/certs/pki_chain.pem:ro
|
2021-02-25 15:51:58 +00:00
|
|
|
environment:
|
2021-04-12 12:40:45 +00:00
|
|
|
# timezone inside container
|
2021-10-13 05:59:44 +00:00
|
|
|
- TZ
|
2021-04-12 12:40:45 +00:00
|
|
|
|
|
|
|
# necessary Mattermost options/variables (see env.example)
|
2021-04-12 12:22:58 +00:00
|
|
|
- MM_SQLSETTINGS_DRIVERNAME
|
|
|
|
- MM_SQLSETTINGS_DATASOURCE
|
|
|
|
|
2021-04-20 18:23:52 +00:00
|
|
|
# additional settings
|
2021-02-25 15:51:58 +00:00
|
|
|
- MM_SERVICESETTINGS_SITEURL
|
|
|
|
|
2021-04-12 12:18:38 +00:00
|
|
|
# If you use rolling image tags and feel lucky watchtower can automatically pull new images and
|
|
|
|
# instantiate containers from it. https://containrrr.dev/watchtower/
|
|
|
|
# Please keep in mind watchtower will have access on the docker socket. This can be a security risk.
|
|
|
|
#
|
2021-02-25 15:51:58 +00:00
|
|
|
# watchtower:
|
|
|
|
# container_name: watchtower
|
|
|
|
# image: containrrr/watchtower:latest
|
|
|
|
# restart: unless-stopped
|
|
|
|
# volumes:
|
|
|
|
# - /var/run/docker.sock:/var/run/docker.sock
|