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-11 13:30:11 +00:00
|
|
|
- TZ: ${TZ}
|
2021-04-12 12:40:45 +00:00
|
|
|
|
|
|
|
# necessay 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
|
|
|
|
read_only: true
|
|
|
|
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-02-25 15:51:58 +00:00
|
|
|
environment:
|
2021-04-12 12:40:45 +00:00
|
|
|
# timezone inside container
|
2021-10-11 13:30:11 +00:00
|
|
|
- TZ: ${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
|