67 lines
2.1 KiB
YAML
67 lines
2.1 KiB
YAML
# Mattermore — Local Mattermost testing rig
|
|
# Start: docker compose up -d
|
|
# Stop: docker compose down
|
|
# URL: http://localhost:8065
|
|
# Reset: docker compose down -v (wipes DB + config)
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: mattermore-db
|
|
environment:
|
|
POSTGRES_DB: mattermost_test
|
|
POSTGRES_USER: mmuser
|
|
POSTGRES_PASSWORD: mmuser_pass
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U mmuser -d mattermost_test"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
mattermost:
|
|
image: mattermost/mattermost-team-edition:11.6.1
|
|
container_name: mattermore-server
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
# Database
|
|
MM_USERNAME: mmuser
|
|
MM_PASSWORD: mmuser_pass
|
|
MM_DBNAME: mattermost_test
|
|
MM_DBHOST: postgres:5432
|
|
# Server
|
|
MM_SERVICESETTINGS_SITEURL: http://localhost:8065
|
|
MM_SERVICESETTINGS_LISTENADDRESS: :8065
|
|
MM_SERVICESETTINGS_ENABLEDEVELOPER: "true"
|
|
MM_SERVICESETTINGS_ENABLEBOTACCOUNTCREATION: "true"
|
|
MM_SERVICESETTINGS_ENABLEUSERACCESSTOKENS: "true"
|
|
MM_SERVICESETTINGS_ENABLEAPI: "true"
|
|
MM_SERVICESETTINGS_ENABLECUSTOMGROUPS: "true"
|
|
MM_PLUGINSETTINGS_ENABLEUPLOADS: "true"
|
|
MM_PLUGINSETTINGS_ENABLE: "true"
|
|
MM_PLUGINSETTINGS_AUTOMATICPRECACHEDPLUGINS: "false"
|
|
MM_LOGSETTINGS_ENABLECONSOLE: "true"
|
|
MM_LOGSETTINGS_CONSOLELEVEL: "DEBUG"
|
|
MM_ANNOUNCEMENTSETTINGS_ADMINNOTICESENABLED: "false"
|
|
ports:
|
|
- "8065:8065"
|
|
# Auto-create admin user (admin/admin) on first boot.
|
|
entrypoint: ["/bin/bash", "/init.sh"]
|
|
volumes:
|
|
# Init script creates admin user on first startup.
|
|
- ./init.sh:/init.sh:ro
|
|
# Plugin directory — mount so you can upload via UI:
|
|
- ./mattermost/plugins:/mattermost/data/plugins:rw
|
|
# Data volume for uploads, avatars, etc.
|
|
- mattermost-data:/mattermost/data:rw
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -sf http://localhost:8065/api/v4/system/ping | grep -q OK"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 30s
|
|
|
|
volumes:
|
|
mattermost-data:
|