mattermost-docker/docker-compose.yml

75 lines
2.2 KiB
YAML
Raw Normal View History

2021-04-12 12:18:38 +00:00
# https://docs.docker.com/compose/environment-variables/
2021-02-25 15:51:58 +00:00
version: "3"
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-02-25 15:51:58 +00:00
volumes:
- ${POSTGRES_DATA_PATH}:/var/lib/postgresql/data
environment:
# timezone inside container
- TZ
# necessay Postgres options/variables
2021-02-25 15:51:58 +00:00
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
nginx:
container_name: nginx_mattermost
2021-04-12 12:05:15 +00:00
image: nginx:${NGINX_IMAGE_TAG}
2021-04-12 13:02:03 +00:00
restart: ${RESTART_POLICY}
2021-02-25 15:51:58 +00:00
volumes:
- ${NGINX_MATTERMOST_CONFIG}:/etc/nginx/conf.d/mattermost.conf:ro
2021-04-12 08:36:07 +00:00
- ${NGINX_DHPARAMS_FILE}:/dhparams4096.pem
- ${CERT_PATH}:/cert.pem:ro
- ${KEY_PATH}:/key.pem:ro
environment:
# timezone inside container
- TZ
2021-02-25 15:51:58 +00:00
ports:
- ${HTTPS_PORT}:443
- ${HTTP_PORT}:80
mattermost:
depends_on:
- postgres
- nginx
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-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
- ${MATTERMOST_CLIENT_PLUGINS_PATH}:/mattermost/client-plugins:rw
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-02-25 15:51:58 +00:00
- MM_SERVICESETTINGS_SITEURL
- MM_LOGSETTINGS_CONSOLELEVEL
- MM_LOGSETTINGS_FILELEVEL
- MM_PASSWORDSETTINGS_MINIMUMLENGTH
- MM_PASSWORDSETTINGS_SYMBOL
- MM_PASSWORDSETTINGS_UPPERCASE
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