Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

1.6 KB
Raw Blame
# documentation: https://docs.mattermost.com
# slogan: Mattermost is an open source, self-hosted Slack-alternative.
# category: messaging
# tags: mattermost,slack,alternative
# logo: svgs/mattermost.svg
# port: 8065
# amd_only: true

services:
  mattermost:
    image: mattermost/mattermost-team-edition:release-10
    platform: linux/amd64
    volumes:
      - "mattermost-data-config:/mattermost/config:rw"
      - "mattermost-data-data:/mattermost/data:rw"
      - "mattermost-data-logs:/mattermost/logs:rw"
      - "mattermost-data-plugins:/mattermost/plugins:rw"
      - "mattermost-data-client-plugins:/mattermost/client/plugins:rw"
      - "mattermost-data-bleve-indexes:/mattermost/bleve-indexes:rw"
    environment:
      - SERVICE_URL_MATTERMOST_8065
      - MM_SERVICESETTINGS_SITEURL=${SERVICE_URL_MATTERMOST}
      - TZ=${TZ:-UTC}
      - MM_SQLSETTINGS_DRIVERNAME=postgres
      - MM_SQLSETTINGS_DATASOURCE=postgres://$SERVICE_USER_POSTGRES:$SERVICE_PASSWORD_POSTGRES@postgres:5432/$POSTGRES_DB?sslmode=disable&connect_timeout=10
      - MM_BLEVESETTINGS_INDEXDIR=/mattermost/bleve-indexes
    depends_on:
      postgres:
        condition: service_healthy

  postgres:
    image: postgres:16-alpine
    volumes:
      - postgresql-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=$SERVICE_USER_POSTGRES
      - POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES
      - POSTGRES_DB=${POSTGRES_DB:-mattermost}
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
      interval: 5s
      timeout: 20s
      retries: 10