Mattermost
Mattermost is an open-source, self-hosted alternative to Slack designed for team collaboration with a focus on security and privacy. It provides persistent chat organized into teams and channels, direct messaging, file sharing, search, and integrations with developer tools. This stack deploys the Mattermost Team Edition application server backed by PostgreSQL 16 for reliable data persistence. Mattermost supports webhooks, slash commands, bots, and a plugin marketplace for extending functionality with integrations like Jira, GitLab, GitHub, and more. Data including uploaded files, plugins, and configuration is persisted across named volumes. After deployment, access the web UI on port 8065 to create your first team and invite members.
Services Inclus
mattermost
mattermost/mattermost-team-edition:latest
Variables d'Environnement :
postgres
postgres:16-alpine
Variables d'Environnement :
YAML Généré
# Generated by ComposeHub (composehub.dev)
name: mattermost
services:
mattermost:
image: mattermost/mattermost-team-edition:latest
restart: always
ports:
- 8065:8065
volumes:
- mattermost_config:/mattermost/config
- mattermost_data:/mattermost/data
- mattermost_logs:/mattermost/logs
- mattermost_plugins:/mattermost/plugins
- mattermost_client_plugins:/mattermost/client/plugins
- mattermost_bleve:/mattermost/bleve-indexes
environment:
TZ: ${TZ:-UTC}
MM_SQLSETTINGS_DRIVERNAME: postgres
MM_SQLSETTINGS_DATASOURCE: >-
postgres://${POSTGRES_USER:-mattermost}:${POSTGRES_PASSWORD:-changeme}@postgres:5432/${POSTGRES_DB:-mattermost}?sslmode=disable&connect_timeout=10
MM_BLEVESETTINGS_INDEXDIR: /mattermost/bleve-indexes
MM_SERVICESETTINGS_SITEURL: ${MM_SITEURL:-http://localhost:8065}
MM_SERVICESETTINGS_ENABLELOCALMODE: ${MM_ENABLE_LOCAL_MODE:-false}
networks:
- mattermost
depends_on:
postgres:
condition: service_healthy
healthcheck:
test:
- CMD-SHELL
- curl -f http://localhost:8065/api/v4/system/ping || exit 1
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
deploy:
resources:
limits:
cpus: "2.00"
memory: 1024M
reservations:
cpus: "0.50"
memory: 256M
labels:
com.composehub.description: Mattermost Team Edition application server
postgres:
image: postgres:16-alpine
restart: always
volumes:
- mattermost_db:/var/lib/postgresql/data
environment:
POSTGRES_DB: ${POSTGRES_DB:-mattermost}
POSTGRES_USER: ${POSTGRES_USER:-mattermost}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
networks:
- mattermost
healthcheck:
test:
- CMD-SHELL
- pg_isready -U ${POSTGRES_USER:-mattermost} -d ${POSTGRES_DB:-mattermost}
interval: 5s
timeout: 5s
retries: 10
start_period: 30s
deploy:
resources:
limits:
cpus: "1.00"
memory: 512M
reservations:
cpus: "0.25"
memory: 128M
labels:
com.composehub.description: PostgreSQL 16 database for Mattermost
networks:
mattermost:
driver: bridge
volumes:
mattermost_db:
driver: local
mattermost_config:
driver: local
mattermost_data:
driver: local
mattermost_logs:
driver: local
mattermost_plugins:
driver: local
mattermost_client_plugins:
driver: local
mattermost_bleve:
driver: local
Informations Rapides
- Services
- 2
- Réseaux
- 1
- Volumes
- 7
Quand l'Utiliser
Ce modèle est idéal pour mettre en place un environnement mattermost Tous les services sont préconfigurés avec des healthchecks, des limites de ressources et des valeurs par défaut raisonnables. Personnalisez les variables d'environnement avant de déployer en production.
Conseils
- Changez tous les mots de passe par défaut avant le déploiement
- Vérifiez les limites de ressources pour votre matériel
- Ajoutez un reverse proxy pour le HTTPS en production
- Configurez des stratégies de sauvegarde pour les volumes de données