Nomploy Nomad Packs

← All packs

wikijs v0.1.0

Notes & docs

Wiki.js — a modern, powerful wiki with a Markdown/WYSIWYG editor, full-text search, access control, and Git/storage sync. Deployed as an all-in-one host-networked Nomad job: a PostgreSQL sidecar plus the Wiki.js app (content is stored in Postgres, so only the database needs a volume).

nomad-pack run wikijs --registry nomploy
…or one line (add registry + run)
curl -fsSL https://packs.nomploy.com/install.sh | sh -s -- wikijs

Needs nomad-pack on PATH. The script only adds the nomploy registry and runs this pack.

2 tasks http 3010db 5432 1 volume image ghcr.io/requarks/wiki:2 pinned :2 image bumped 28 days ago
Variables 12
values.hcl

Save as values.hcl, edit, then run:

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

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

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

# The Wiki.js container image. Pin a tag in production.
image = "ghcr.io/requarks/wiki:2"

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

# Host port for the Wiki.js web UI (PORT).
port = 3010

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

# Password for the Wiki.js PostgreSQL user.
db_password = "wikijs"

# Named volume for PostgreSQL data (/var/lib/postgresql/data). Holds all wiki content.
db_data_volume = "wikijs_db_data"

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

# Resources for the Wiki.js app task.
resources = {
    cpu    = 500
    memory = 512
  }

# Resources for the PostgreSQL task.
postgres_resources = {
    cpu    = 300
    memory = 256
  }
NameTypeDefaultDescription
job_name string
"wikijs"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"ghcr.io/requarks/wiki:2"
The Wiki.js container image. Pin a tag in production.
postgres_image string
"postgres:16-alpine"
The PostgreSQL image for the bundled database.
port number
3010
Host port for the Wiki.js web UI (PORT).
db_port number
5432
Host port for the co-located PostgreSQL.
db_password key string
"wikijs"
Password for the Wiki.js PostgreSQL user.
db_data_volume string
"wikijs_db_data"
Named volume for PostgreSQL data (/var/lib/postgresql/data). Holds all wiki content.
constraints list
[]
Placement constraints. Pin to the node holding the volume. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
resources object
{
    cpu    = 500
    memory = 512
  }
Resources for the Wiki.js app task.
postgres_resources object
{
    cpu    = 300
    memory = 256
  }
Resources for the PostgreSQL task.
Back up this pack

This pack stores data in one Docker named volume: wikijs_db_data

⚠ This pack bundles a database. A cold copy of the volume can be inconsistent — for a reliable backup, dump the DB (pg_dump / mysqldump) or stop the job while backing up.

restic

# Run on the node hosting this pack. Point restic at your repo first:
#   export RESTIC_REPOSITORY="s3:https://<account>.r2.cloudflarestorage.com/<bucket>"
#   export RESTIC_PASSWORD="<repo-password>"
#   export AWS_ACCESS_KEY_ID=<key>  AWS_SECRET_ACCESS_KEY=<secret>
restic backup \
  /var/lib/docker/volumes/wikijs_db_data/_data

rclone (sync to S3/R2)

rclone sync /var/lib/docker/volumes/wikijs_db_data/_data backup:<bucket>/wikijs_db_data

Paths assume the default Docker volume location (/var/lib/docker/volumes). Restore by stopping the job, restoring files into the same volume, and re-running the pack.

Readme

wikijs

Wiki.js — a modern, powerful wiki with a Markdown/WYSIWYG editor, full-text search, granular access control, and Git/storage sync.

All-in-one host-networked Nomad job: a PostgreSQL prestart sidecar plus the Wiki.js app. Content is stored in Postgres, so only the database needs a volume.

Deploy

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

Configure

Variable Default Description
port 3010 Web UI port (PORT).
db_port 5432 Co-located PostgreSQL port.
db_password wikijs Password for the Wiki.js Postgres user.
db_data_volume wikijs_db_data /var/lib/postgresql/data — all wiki content.
image ghcr.io/requarks/wiki:2 Wiki.js image. Pin a tag in production.
postgres_image postgres:16-alpine Database image.
resources / postgres_resources see defaults Per-task resources.

Complete the setup wizard on first visit to create the administrator. Pin the job to the node holding db_data_volume with constraints.