Nomploy Nomad Packs

← All packs

hedgedoc v0.1.0

Apps

HedgeDoc — real-time, collaborative Markdown notes in the browser (shared editing, presentation mode, diagrams). Deployed as an all-in-one host-networked Nomad job: a PostgreSQL sidecar plus the HedgeDoc app with a persistent uploads volume.

nomad-pack run hedgedoc --registry nomploy
3 tasks http 3011db 5432 2 volumes image quay.io/hedgedoc/hedgedoc:1.10.3
Variables 16
values.hcl

Save as values.hcl, edit, then run:

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

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

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

# The HedgeDoc container image. Pin a tag in production.
image = "quay.io/hedgedoc/hedgedoc:1.10.3"

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

# Host port for the HedgeDoc web UI (CMD_PORT).
port = 3011

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

# Password for the HedgeDoc PostgreSQL user.
db_password = "hedgedoc"

# Domain (or host IP) HedgeDoc is reached at (CMD_DOMAIN), no protocol/port. Empty = localhost. Set this to the real host/domain so real-time sync and links work for remote clients.
domain = ""

# Allow anonymous (no-login) note creation and editing (CMD_ALLOW_ANONYMOUS).
allow_anonymous = true

# UID HedgeDoc runs as. The uploads volume is chown'd to this at startup.
uid = 10000

# Named volume for uploaded images/files (/hedgedoc/public/uploads).
uploads_volume = "hedgedoc_uploads"

# Named volume for PostgreSQL data (/var/lib/postgresql/data). Holds all notes.
db_data_volume = "hedgedoc_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 HedgeDoc app task.
resources = {
    cpu    = 500
    memory = 512
  }

# Resources for the PostgreSQL task.
postgres_resources = {
    cpu    = 300
    memory = 256
  }
NameTypeDefaultDescription
job_name string
"hedgedoc"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"quay.io/hedgedoc/hedgedoc:1.10.3"
The HedgeDoc container image. Pin a tag in production.
postgres_image string
"postgres:16-alpine"
The PostgreSQL image for the bundled database.
port number
3011
Host port for the HedgeDoc web UI (CMD_PORT).
db_port number
5432
Host port for the co-located PostgreSQL.
db_password key string
"hedgedoc"
Password for the HedgeDoc PostgreSQL user.
domain string
""
Domain (or host IP) HedgeDoc is reached at (CMD_DOMAIN), no protocol/port. Empty = localhost. Set this to the real host/domain so real-time sync and links work for remote clients.
allow_anonymous bool
true
Allow anonymous (no-login) note creation and editing (CMD_ALLOW_ANONYMOUS).
uid number
10000
UID HedgeDoc runs as. The uploads volume is chown'd to this at startup.
uploads_volume string
"hedgedoc_uploads"
Named volume for uploaded images/files (/hedgedoc/public/uploads).
db_data_volume string
"hedgedoc_db_data"
Named volume for PostgreSQL data (/var/lib/postgresql/data). Holds all notes.
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    = 500
    memory = 512
  }
Resources for the HedgeDoc app task.
postgres_resources object
{
    cpu    = 300
    memory = 256
  }
Resources for the PostgreSQL task.
Readme

hedgedoc

HedgeDoc — real-time, collaborative Markdown notes in the browser: shared editing, presentation mode, diagrams, and more.

All-in-one host-networked Nomad job: a busybox chown init for the uploads volume, a PostgreSQL prestart sidecar, and the HedgeDoc app. Notes are stored in Postgres; uploads on their own volume.

Deploy

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

Configure

Variable Default Description
port 3011 Web UI port (CMD_PORT).
db_port 5432 Co-located PostgreSQL port.
db_password hedgedoc Password for the HedgeDoc Postgres user.
domain "" CMD_DOMAIN (host/IP or domain, no protocol). See note.
allow_anonymous true Allow no-login note creation/editing.
uid 10000 User HedgeDoc runs as; uploads volume is chown'd to it.
uploads_volume hedgedoc_uploads /hedgedoc/public/uploads.
db_data_volume hedgedoc_db_data PostgreSQL data — all notes.
resources / postgres_resources see defaults Per-task resources.

Set domain to this node's host/IP or your domain. HedgeDoc bakes the domain into generated links and its real-time (WebSocket) origin; left empty it defaults to localhost, which breaks collaborative editing for remote clients. CMD_URL_ADDPORT=true keeps the port in generated URLs for direct host:port access.

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