Nomploy Nomad Packs

← All packs

opengist v0.1.0

Dev tools

Opengist — a self-hosted pastebin powered by Git, an open-source alternative to GitHub Gist: share snippets with syntax highlighting, revisions, visibility controls, and embeds. Deployed as a single host-networked Nomad service on SQLite with a data volume.

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

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

2 tasks http 6157 1 volume image ghcr.io/thomiceli/opengist:1 pinned :1 image bumped 27 days ago
Variables 9
values.hcl

Save as values.hcl, edit, then run:

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

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

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

# The Opengist container image. Pin a tag in production.
image = "ghcr.io/thomiceli/opengist:1"

# Host port for the Opengist web UI (OG_HTTP_PORT).
port = 6157

# UID Opengist runs as. The data volume is chown'd to this at startup.
uid = 1000

# Named volume for the SQLite database and Git repositories (/opengist).
data_volume = "opengist_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    = 300
    memory = 256
  }
NameTypeDefaultDescription
job_name string
"opengist"
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/thomiceli/opengist:1"
The Opengist container image. Pin a tag in production.
port number
6157
Host port for the Opengist web UI (OG_HTTP_PORT).
uid number
1000
UID Opengist runs as. The data volume is chown'd to this at startup.
data_volume string
"opengist_data"
Named volume for the SQLite database and Git repositories (/opengist).
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    = 300
    memory = 256
  }
The task resources.
Back up this pack

This pack stores data in one Docker named volume: opengist_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/opengist_data/_data

rclone (sync to S3/R2)

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

opengist

Opengist — a self-hosted pastebin powered by Git, an open-source alternative to GitHub Gist: share snippets with syntax highlighting, revisions, visibility controls, and embeds.

Single host-networked Nomad service on SQLite with a data volume. A busybox prestart task chowns the data volume to Opengist's UID.

Deploy

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

Configure

Variable Default Description
port 6157 Web UI port (OG_HTTP_PORT).
uid 1000 User Opengist runs as; data volume is chown'd to it.
data_volume opengist_data /opengist — SQLite database + Git repos.
image ghcr.io/thomiceli/opengist:1 Image. Pin a tag in production.
resources { cpu = 300, memory = 256 } Task resources.

The first registered user becomes admin. Git-over-SSH is off by default (HTTP only) — enable it with OG_SSH_GIT_ENABLED + an SSH port if you need git push/pull. Pin the job to the node holding the volume with constraints.