Nomploy Nomad Packs

← All packs

spoolman v0.1.0

Productivity

Spoolman — a filament spool inventory and usage tracker for 3D printing, with a REST API that integrates with OctoPrint, Klipper and Moonraker. Deployed as a single host-networked Nomad service.

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

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

2 tasks http 8000 1 volume image ghcr.io/donkie/spoolman:latest tracks :latest image bumped today
Variables 9
values.hcl

Save as values.hcl, edit, then run:

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

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

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

# The Spoolman container image. Pin a tag in production.
image = "ghcr.io/donkie/spoolman:latest"

# Host port for the Spoolman web UI.
port = 8000

# Named volume mounted at /home/app/.local/share/spoolman (the SQLite database).
data_volume = "spoolman_data"

# Container timezone (TZ), e.g. Europe/Bratislava. Spoolman timestamps use this.
tz = "UTC"

# Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []

# The task resources.
resources = {
    cpu    = 300
    memory = 256
  }
NameTypeDefaultDescription
job_name string
"spoolman"
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/donkie/spoolman:latest"
The Spoolman container image. Pin a tag in production.
port number
8000
Host port for the Spoolman web UI.
data_volume string
"spoolman_data"
Named volume mounted at /home/app/.local/share/spoolman (the SQLite database).
tz string
"UTC"
Container timezone (TZ), e.g. Europe/Bratislava. Spoolman timestamps use this.
constraints list
[]
Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
resources object
{
    cpu    = 300
    memory = 256
  }
The task resources.
Back up this pack

This pack stores data in one Docker named volume: spoolman_data

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/spoolman_data/_data

rclone (sync to S3/R2)

rclone sync /var/lib/docker/volumes/spoolman_data/_data backup:<bucket>/spoolman_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

spoolman

Spoolman — a filament inventory manager for 3D printing. Track your spools, filaments and vendors, watch remaining weight as you print, and let your printer report usage automatically through the REST API — with native integrations for OctoPrint, Klipper/Moonraker and Home Assistant.

Single host-networked Nomad service. Defaults to an embedded SQLite database on a persistent volume.

Deploy

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

Configure

Variable Default Description
port 8000 Web UI / API port (SPOOLMAN_PORT).
image ghcr.io/donkie/spoolman:latest Container image. Pin a tag in production.
data_volume spoolman_data /home/app/.local/share/spoolman — the SQLite database.
tz UTC Container timezone (TZ).
resources { cpu = 300, memory = 256 } Task resources.

A prestart init task chowns the data volume to uid 1000 (Spoolman runs unprivileged). To use an external PostgreSQL/MySQL instead of SQLite, add the SPOOLMAN_DB_* env vars to the spoolman task. Pin the job to the node holding the volume with constraints.