docker.recipes

Team Collaboration Stack

intermediate

Complete team platform with Mattermost chat, Outline wiki, and MinIO file storage

Overview

Mattermost is an open-source team messaging platform designed as a Slack alternative, offering enterprise-grade security and self-hosted deployment. Originally developed by SpinPunch in 2016, Mattermost has become the go-to solution for organizations requiring full control over their communication data while maintaining modern chat functionality including channels, direct messages, file sharing, and extensive integrations. This stack combines Mattermost with Outline wiki for knowledge management and MinIO for S3-compatible object storage, creating a comprehensive team collaboration environment. The integration leverages PostgreSQL databases for both Mattermost and Outline, with Redis providing session management and caching for Outline, while MinIO handles file attachments and media storage across both platforms. This combination addresses the core challenge of fragmented team tools by providing chat, documentation, and file storage in a unified, self-hosted environment. Small to medium businesses, development teams, and organizations with strict data sovereignty requirements will find this stack particularly valuable, as it eliminates the need for multiple SaaS subscriptions while providing enterprise-level collaboration features under complete organizational control.

Key Features

  • Mattermost Team Edition with unlimited users and message history
  • Outline wiki with real-time collaborative editing and markdown support
  • S3-compatible MinIO storage for file attachments and media across both platforms
  • PostgreSQL databases providing ACID compliance for message and document integrity
  • Redis-powered caching for improved Outline performance and session management
  • Mattermost plugin ecosystem supporting custom integrations and bots
  • Outline's advanced search capabilities across all team documentation
  • MinIO web console for direct file management and bucket administration

Common Use Cases

  • 1Software development teams needing chat, documentation, and code artifact storage
  • 2Healthcare organizations requiring HIPAA-compliant team communication and knowledge base
  • 3Educational institutions wanting student collaboration tools without data sharing concerns
  • 4Government agencies needing secure internal communication and document management
  • 5Remote-first companies building comprehensive digital workplace infrastructure
  • 6IT departments replacing multiple SaaS tools with self-hosted alternatives
  • 7Startups requiring professional team tools without recurring subscription costs

Prerequisites

  • Minimum 4GB RAM (2GB for MinIO, 1GB each for PostgreSQL instances, remainder for other services)
  • Available ports 3000, 8065, 9000, and 9001 on the host system
  • Environment variables configured for database credentials and MinIO access keys
  • Basic understanding of Mattermost team setup and user management
  • Familiarity with S3 bucket concepts for MinIO storage configuration
  • PostgreSQL administration knowledge for database maintenance and backups

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 mattermost:
3 image: mattermost/mattermost-team-edition:latest
4 container_name: mattermost
5 restart: unless-stopped
6 ports:
7 - "${MM_PORT:-8065}:8065"
8 environment:
9 - TZ=${TZ:-UTC}
10 - MM_SQLSETTINGS_DRIVERNAME=postgres
11 - MM_SQLSETTINGS_DATASOURCE=postgres://${DB_USER}:${DB_PASSWORD}@mattermost-db:5432/mattermost?sslmode=disable
12 - MM_SERVICESETTINGS_SITEURL=http://localhost:${MM_PORT:-8065}
13 volumes:
14 - mattermost_data:/mattermost/data
15 - mattermost_logs:/mattermost/logs
16 - mattermost_config:/mattermost/config
17 - mattermost_plugins:/mattermost/plugins
18 depends_on:
19 - mattermost-db
20
21 mattermost-db:
22 image: postgres:15-alpine
23 container_name: mattermost-db
24 restart: unless-stopped
25 environment:
26 - POSTGRES_USER=${DB_USER}
27 - POSTGRES_PASSWORD=${DB_PASSWORD}
28 - POSTGRES_DB=mattermost
29 volumes:
30 - mattermost_db_data:/var/lib/postgresql/data
31
32 outline:
33 image: outlinewiki/outline:latest
34 container_name: outline
35 restart: unless-stopped
36 ports:
37 - "${OUTLINE_PORT:-3000}:3000"
38 environment:
39 - SECRET_KEY=${OUTLINE_SECRET}
40 - UTILS_SECRET=${OUTLINE_UTILS_SECRET}
41 - DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@outline-db:5432/outline
42 - REDIS_URL=redis://outline-redis:6379
43 - URL=http://localhost:${OUTLINE_PORT:-3000}
44 - AWS_ACCESS_KEY_ID=${MINIO_USER}
45 - AWS_SECRET_ACCESS_KEY=${MINIO_PASSWORD}
46 - AWS_S3_UPLOAD_BUCKET_URL=http://minio:9000
47 - AWS_S3_UPLOAD_BUCKET_NAME=outline
48 depends_on:
49 - outline-db
50 - outline-redis
51 - minio
52
53 outline-db:
54 image: postgres:15-alpine
55 container_name: outline-db
56 restart: unless-stopped
57 environment:
58 - POSTGRES_USER=${DB_USER}
59 - POSTGRES_PASSWORD=${DB_PASSWORD}
60 - POSTGRES_DB=outline
61 volumes:
62 - outline_db_data:/var/lib/postgresql/data
63
64 outline-redis:
65 image: redis:7-alpine
66 container_name: outline-redis
67 restart: unless-stopped
68
69 minio:
70 image: minio/minio:latest
71 container_name: collab-minio
72 restart: unless-stopped
73 ports:
74 - "${MINIO_PORT:-9000}:9000"
75 - "${MINIO_CONSOLE:-9001}:9001"
76 environment:
77 - MINIO_ROOT_USER=${MINIO_USER}
78 - MINIO_ROOT_PASSWORD=${MINIO_PASSWORD}
79 volumes:
80 - minio_data:/data
81 command: server /data --console-address ":9001"
82
83volumes:
84 mattermost_data:
85 mattermost_logs:
86 mattermost_config:
87 mattermost_plugins:
88 mattermost_db_data:
89 outline_db_data:
90 minio_data:

.env Template

.env
1# Team Collaboration Stack
2MM_PORT=8065
3OUTLINE_PORT=3000
4MINIO_PORT=9000
5MINIO_CONSOLE=9001
6TZ=UTC
7
8# Database
9DB_USER=collab
10DB_PASSWORD=collab_password
11
12# Outline secrets (generate with: openssl rand -hex 32)
13OUTLINE_SECRET=your-secret-key
14OUTLINE_UTILS_SECRET=your-utils-secret
15
16# MinIO
17MINIO_USER=minioadmin
18MINIO_PASSWORD=minioadmin

Usage Notes

  1. 1Mattermost at http://localhost:8065 (create team)
  2. 2Outline wiki at http://localhost:3000
  3. 3MinIO Console at http://localhost:9001
  4. 4Configure SSO between Mattermost and Outline
  5. 5Create 'outline' bucket in MinIO for attachments
  6. 6Mattermost supports Slack-like integrations

Individual Services(6 services)

Copy individual services to mix and match with your existing compose files.

mattermost
mattermost:
  image: mattermost/mattermost-team-edition:latest
  container_name: mattermost
  restart: unless-stopped
  ports:
    - ${MM_PORT:-8065}:8065
  environment:
    - TZ=${TZ:-UTC}
    - MM_SQLSETTINGS_DRIVERNAME=postgres
    - MM_SQLSETTINGS_DATASOURCE=postgres://${DB_USER}:${DB_PASSWORD}@mattermost-db:5432/mattermost?sslmode=disable
    - MM_SERVICESETTINGS_SITEURL=http://localhost:${MM_PORT:-8065}
  volumes:
    - mattermost_data:/mattermost/data
    - mattermost_logs:/mattermost/logs
    - mattermost_config:/mattermost/config
    - mattermost_plugins:/mattermost/plugins
  depends_on:
    - mattermost-db
mattermost-db
mattermost-db:
  image: postgres:15-alpine
  container_name: mattermost-db
  restart: unless-stopped
  environment:
    - POSTGRES_USER=${DB_USER}
    - POSTGRES_PASSWORD=${DB_PASSWORD}
    - POSTGRES_DB=mattermost
  volumes:
    - mattermost_db_data:/var/lib/postgresql/data
outline
outline:
  image: outlinewiki/outline:latest
  container_name: outline
  restart: unless-stopped
  ports:
    - ${OUTLINE_PORT:-3000}:3000
  environment:
    - SECRET_KEY=${OUTLINE_SECRET}
    - UTILS_SECRET=${OUTLINE_UTILS_SECRET}
    - DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@outline-db:5432/outline
    - REDIS_URL=redis://outline-redis:6379
    - URL=http://localhost:${OUTLINE_PORT:-3000}
    - AWS_ACCESS_KEY_ID=${MINIO_USER}
    - AWS_SECRET_ACCESS_KEY=${MINIO_PASSWORD}
    - AWS_S3_UPLOAD_BUCKET_URL=http://minio:9000
    - AWS_S3_UPLOAD_BUCKET_NAME=outline
  depends_on:
    - outline-db
    - outline-redis
    - minio
outline-db
outline-db:
  image: postgres:15-alpine
  container_name: outline-db
  restart: unless-stopped
  environment:
    - POSTGRES_USER=${DB_USER}
    - POSTGRES_PASSWORD=${DB_PASSWORD}
    - POSTGRES_DB=outline
  volumes:
    - outline_db_data:/var/lib/postgresql/data
outline-redis
outline-redis:
  image: redis:7-alpine
  container_name: outline-redis
  restart: unless-stopped
minio
minio:
  image: minio/minio:latest
  container_name: collab-minio
  restart: unless-stopped
  ports:
    - ${MINIO_PORT:-9000}:9000
    - ${MINIO_CONSOLE:-9001}:9001
  environment:
    - MINIO_ROOT_USER=${MINIO_USER}
    - MINIO_ROOT_PASSWORD=${MINIO_PASSWORD}
  volumes:
    - minio_data:/data
  command: server /data --console-address ":9001"

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 mattermost:
5 image: mattermost/mattermost-team-edition:latest
6 container_name: mattermost
7 restart: unless-stopped
8 ports:
9 - "${MM_PORT:-8065}:8065"
10 environment:
11 - TZ=${TZ:-UTC}
12 - MM_SQLSETTINGS_DRIVERNAME=postgres
13 - MM_SQLSETTINGS_DATASOURCE=postgres://${DB_USER}:${DB_PASSWORD}@mattermost-db:5432/mattermost?sslmode=disable
14 - MM_SERVICESETTINGS_SITEURL=http://localhost:${MM_PORT:-8065}
15 volumes:
16 - mattermost_data:/mattermost/data
17 - mattermost_logs:/mattermost/logs
18 - mattermost_config:/mattermost/config
19 - mattermost_plugins:/mattermost/plugins
20 depends_on:
21 - mattermost-db
22
23 mattermost-db:
24 image: postgres:15-alpine
25 container_name: mattermost-db
26 restart: unless-stopped
27 environment:
28 - POSTGRES_USER=${DB_USER}
29 - POSTGRES_PASSWORD=${DB_PASSWORD}
30 - POSTGRES_DB=mattermost
31 volumes:
32 - mattermost_db_data:/var/lib/postgresql/data
33
34 outline:
35 image: outlinewiki/outline:latest
36 container_name: outline
37 restart: unless-stopped
38 ports:
39 - "${OUTLINE_PORT:-3000}:3000"
40 environment:
41 - SECRET_KEY=${OUTLINE_SECRET}
42 - UTILS_SECRET=${OUTLINE_UTILS_SECRET}
43 - DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@outline-db:5432/outline
44 - REDIS_URL=redis://outline-redis:6379
45 - URL=http://localhost:${OUTLINE_PORT:-3000}
46 - AWS_ACCESS_KEY_ID=${MINIO_USER}
47 - AWS_SECRET_ACCESS_KEY=${MINIO_PASSWORD}
48 - AWS_S3_UPLOAD_BUCKET_URL=http://minio:9000
49 - AWS_S3_UPLOAD_BUCKET_NAME=outline
50 depends_on:
51 - outline-db
52 - outline-redis
53 - minio
54
55 outline-db:
56 image: postgres:15-alpine
57 container_name: outline-db
58 restart: unless-stopped
59 environment:
60 - POSTGRES_USER=${DB_USER}
61 - POSTGRES_PASSWORD=${DB_PASSWORD}
62 - POSTGRES_DB=outline
63 volumes:
64 - outline_db_data:/var/lib/postgresql/data
65
66 outline-redis:
67 image: redis:7-alpine
68 container_name: outline-redis
69 restart: unless-stopped
70
71 minio:
72 image: minio/minio:latest
73 container_name: collab-minio
74 restart: unless-stopped
75 ports:
76 - "${MINIO_PORT:-9000}:9000"
77 - "${MINIO_CONSOLE:-9001}:9001"
78 environment:
79 - MINIO_ROOT_USER=${MINIO_USER}
80 - MINIO_ROOT_PASSWORD=${MINIO_PASSWORD}
81 volumes:
82 - minio_data:/data
83 command: server /data --console-address ":9001"
84
85volumes:
86 mattermost_data:
87 mattermost_logs:
88 mattermost_config:
89 mattermost_plugins:
90 mattermost_db_data:
91 outline_db_data:
92 minio_data:
93EOF
94
95# 2. Create the .env file
96cat > .env << 'EOF'
97# Team Collaboration Stack
98MM_PORT=8065
99OUTLINE_PORT=3000
100MINIO_PORT=9000
101MINIO_CONSOLE=9001
102TZ=UTC
103
104# Database
105DB_USER=collab
106DB_PASSWORD=collab_password
107
108# Outline secrets (generate with: openssl rand -hex 32)
109OUTLINE_SECRET=your-secret-key
110OUTLINE_UTILS_SECRET=your-utils-secret
111
112# MinIO
113MINIO_USER=minioadmin
114MINIO_PASSWORD=minioadmin
115EOF
116
117# 3. Start the services
118docker compose up -d
119
120# 4. View logs
121docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/team-collaboration-stack/run | bash

Troubleshooting

  • Mattermost shows database connection error: Ensure mattermost-db container is fully started before Mattermost, check DB_USER and DB_PASSWORD variables match
  • Outline fails to load with 'Redis connection failed': Verify outline-redis container is running and accessible, restart outline service if Redis was restarted
  • File uploads fail in Outline: Check MinIO container is running, verify MINIO_USER and MINIO_PASSWORD match AWS credentials in Outline configuration
  • MinIO console shows 'outline' bucket missing: Manually create the 'outline' bucket through MinIO console at localhost:9001 before uploading files
  • Mattermost performance degrades over time: Monitor PostgreSQL container memory usage, consider increasing shared_buffers and work_mem settings
  • Outline wiki shows 'Database migration failed': Stop Outline container, ensure outline-db is running and accessible, then restart Outline to retry migrations

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space