mattermost-docker/docker-compose.yml

76 lines
2.4 KiB
YAML
Raw Normal View History

2021-04-12 12:18:38 +00:00
# https://docs.docker.com/compose/environment-variables/
version: "2.4"
2021-02-25 15:51:58 +00:00
services:
postgres:
2021-04-12 12:05:15 +00:00
image: postgres:${POSTGRES_IMAGE_TAG}
2021-04-12 13:02:03 +00:00
restart: ${RESTART_POLICY}
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:
# timezone inside container
- TZ
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
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}
security_opt:
- no-new-privileges:true
pids_limit: 200
read_only: ${MATTERMOST_CONTAINER_READONLY}
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:19:57 +00:00
- ${MATTERMOST_BLEVE_INDEXES_PATH}:/mattermost/bleve-indexes:rw
# 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:
# timezone inside container
- TZ
# necessary Mattermost options/variables (see env.example)
- MM_SQLSETTINGS_DRIVERNAME
- MM_SQLSETTINGS_DATASOURCE
2021-12-17 11:19:57 +00:00
# necessary for bleve
- MM_BLEVESETTINGS_INDEXDIR
2021-04-20 18:23:52 +00:00
# additional settings
2021-02-25 15:51:58 +00:00
- MM_SERVICESETTINGS_SITEURL
ports:
- ${CALLS_PORT}:8443/udp
2023-06-20 21:56:47 +00:00
- ${CALLS_PORT}:8443/tcp
2021-02-25 15:51:58 +00:00
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