Nomploy Nomad Packs

← All packs

trilium v0.1.0

Apps

Trilium Notes (TriliumNext) — a hierarchical note-taking and personal knowledge-base app with rich text, code notes, scripting, and full-text search. Deployed as a single host-networked Nomad service with a persistent data volume (SQLite).

nomad-pack run trilium --registry nomploy
2 tasks http 8102 1 volume image triliumnext/trilium:latest
Variables 10
values.hcl

Save as values.hcl, edit, then run:

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

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

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

# The TriliumNext container image. Pin a tag in production.
image = "triliumnext/trilium:latest"

# Host port for the Trilium web UI (TRILIUM_PORT).
port = 8102

# UID Trilium runs as (USER_UID). The data volume is chown'd to this at startup.
uid = 1000

# GID Trilium runs as (USER_GID).
gid = 1000

# Named volume for Trilium's data (document.db + config + attachments), at /home/node/trilium-data.
data_volume = "trilium_data"

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

# The task resources.
resources = {
    cpu    = 500
    memory = 256
  }
NameTypeDefaultDescription
job_name string
"trilium"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"triliumnext/trilium:latest"
The TriliumNext container image. Pin a tag in production.
port number
8102
Host port for the Trilium web UI (TRILIUM_PORT).
uid number
1000
UID Trilium runs as (USER_UID). The data volume is chown'd to this at startup.
gid number
1000
GID Trilium runs as (USER_GID).
data_volume string
"trilium_data"
Named volume for Trilium's data (document.db + config + attachments), at /home/node/trilium-data.
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 = 256
  }
The task resources.
Readme

trilium

Trilium Notes (TriliumNext) — a hierarchical note-taking and personal knowledge-base application with rich text, code notes, scripting, relations, and fast full-text search.

Single host-networked Nomad service backed by SQLite. A busybox prestart task chowns the data volume to the configured UID/GID (Trilium runs as uid 1000).

Deploy

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

Configure

Variable Default Description
port 8102 Web UI port (TRILIUM_PORT).
uid / gid 1000 / 1000 User Trilium runs as (USER_UID/USER_GID); volume is chown'd to it.
data_volume trilium_data /home/node/trilium-data — database, config, attachments.
image triliumnext/trilium:latest Container image. Pin a tag in production.
resources { cpu = 500, memory = 256 } Task resources.

Set a password on first visit (it protects the whole instance). Pin the job to the node holding data_volume with constraints.