Nomploy Nomad Packs

← All packs

mattermost v0.1.0

Apps

Mattermost — a self-hosted team chat and collaboration platform (a Slack alternative) with channels, threads, file sharing, and integrations. Deployed as an all-in-one host-networked Nomad job: a PostgreSQL sidecar plus the Mattermost Team Edition server with config/data/plugins volumes.

nomad-pack run mattermost --registry nomploy
3 tasks http 8065db 5432 5 volumes image mattermost/mattermost-team-edition:latest
Variables 18
values.hcl

Save as values.hcl, edit, then run:

nomad-pack run mattermost -f values.hcl --registry nomploy
# The name of the Nomad job.
job_name = "mattermost"

# The Nomad namespace to deploy into.
namespace = "default"

# The datacenters to deploy to.
datacenters = ["*"]

# The Mattermost Team Edition container image. Pin a tag in production.
image = "mattermost/mattermost-team-edition:latest"

# The PostgreSQL image for the bundled database.
postgres_image = "postgres:16-alpine"

# Host port for the Mattermost web UI / API.
port = 8065

# Host port for the co-located PostgreSQL.
db_port = 5432

# Password for the Mattermost PostgreSQL user.
db_password = "mattermost"

# Public URL Mattermost is served at (MM_SERVICESETTINGS_SITEURL). Empty = http://localhost:<port>. Set this to the real host/domain.
site_url = ""

# UID Mattermost runs as. The mounted dirs are chown'd to this at startup.
uid = 2000

# Named volume for Mattermost config (/mattermost/config).
config_volume = "mattermost_config"

# Named volume for uploaded files (/mattermost/data).
data_volume = "mattermost_data"

# Named volume for plugins (/mattermost/plugins).
plugins_volume = "mattermost_plugins"

# Named volume for client plugin bundles (/mattermost/client/plugins).
client_plugins_volume = "mattermost_client_plugins"

# Named volume for PostgreSQL data (/var/lib/postgresql/data). Holds all messages.
db_data_volume = "mattermost_db_data"

# Placement constraints. Pin to the node holding the volumes. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []

# Resources for the Mattermost app task.
resources = {
    cpu    = 1000
    memory = 1024
  }

# Resources for the PostgreSQL task.
postgres_resources = {
    cpu    = 300
    memory = 256
  }
NameTypeDefaultDescription
job_name string
"mattermost"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"mattermost/mattermost-team-edition:latest"
The Mattermost Team Edition container image. Pin a tag in production.
postgres_image string
"postgres:16-alpine"
The PostgreSQL image for the bundled database.
port number
8065
Host port for the Mattermost web UI / API.
db_port number
5432
Host port for the co-located PostgreSQL.
db_password key string
"mattermost"
Password for the Mattermost PostgreSQL user.
site_url string
""
Public URL Mattermost is served at (MM_SERVICESETTINGS_SITEURL). Empty = http://localhost:<port>. Set this to the real host/domain.
uid number
2000
UID Mattermost runs as. The mounted dirs are chown'd to this at startup.
config_volume string
"mattermost_config"
Named volume for Mattermost config (/mattermost/config).
data_volume string
"mattermost_data"
Named volume for uploaded files (/mattermost/data).
plugins_volume string
"mattermost_plugins"
Named volume for plugins (/mattermost/plugins).
client_plugins_volume string
"mattermost_client_plugins"
Named volume for client plugin bundles (/mattermost/client/plugins).
db_data_volume string
"mattermost_db_data"
Named volume for PostgreSQL data (/var/lib/postgresql/data). Holds all messages.
constraints list
[]
Placement constraints. Pin to the node holding the volumes. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
resources object
{
    cpu    = 1000
    memory = 1024
  }
Resources for the Mattermost app task.
postgres_resources object
{
    cpu    = 300
    memory = 256
  }
Resources for the PostgreSQL task.
Readme

mattermost

Mattermost — a self-hosted team chat and collaboration platform (a Slack alternative) with channels, threads, file sharing, and integrations. This pack runs the Team Edition (free, open source).

All-in-one host-networked Nomad job: a busybox chown init, a PostgreSQL prestart sidecar, and the Mattermost server. Messages live in Postgres; uploads/config/plugins on their own volumes.

Deploy

nomad-pack registry add nomploy https://github.com/Nomploy/nomad-packs
nomad-pack run mattermost --registry=nomploy

Configure

Variable Default Description
port 8065 Web UI / API port.
db_port 5432 Co-located PostgreSQL port.
db_password mattermost Password for the Mattermost Postgres user.
site_url "" MM_SERVICESETTINGS_SITEURL; empty = http://localhost:<port>. See note.
uid 2000 User Mattermost runs as; mounted dirs are chown'd to it.
config_volume / data_volume / plugins_volume / client_plugins_volume named volumes Config, uploads, plugins.
db_data_volume mattermost_db_data PostgreSQL data — all messages.
resources / postgres_resources see defaults Per-task resources.

Set site_url to this node's host/IP or your domain — Mattermost needs a correct Site URL for uploads, integrations, and mobile clients. The first account created becomes the System Admin.

Pin the job to the node holding the volumes with constraints.