Nomploy Nomad Packs

← All packs

microbin v0.1.0

Dev tools

MicroBin — a tiny, feature-rich, self-contained pastebin and file-sharing web app: share text and files with expiry, encryption, QR codes, and a URL shortener. Deployed as a single host-networked Nomad service with a data volume.

nomad-pack run microbin --registry nomploy
1 task http 8109 1 volume image danielszabo99/microbin:latest
Variables 11
values.hcl

Save as values.hcl, edit, then run:

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

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

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

# The MicroBin container image. Pin a tag in production.
image = "danielszabo99/microbin:latest"

# Host port for the MicroBin web UI (MICROBIN_PORT).
port = 8109

# Public base URL (MICROBIN_PUBLIC_PATH), used for generated links/QR codes. Empty = http://localhost:<port>.
public_url = ""

# Admin username (MICROBIN_ADMIN_USERNAME).
admin_username = "admin"

# Admin password (MICROBIN_ADMIN_PASSWORD). CHANGE THIS.
admin_password = "changeme-please"

# Named volume for pastas, uploaded files, and the database (/app/microbin_data).
data_volume = "microbin_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    = 200
    memory = 128
  }
NameTypeDefaultDescription
job_name string
"microbin"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"danielszabo99/microbin:latest"
The MicroBin container image. Pin a tag in production.
port number
8109
Host port for the MicroBin web UI (MICROBIN_PORT).
public_url string
""
Public base URL (MICROBIN_PUBLIC_PATH), used for generated links/QR codes. Empty = http://localhost:<port>.
admin_username string
"admin"
Admin username (MICROBIN_ADMIN_USERNAME).
admin_password set me string
"changeme-please"
Admin password (MICROBIN_ADMIN_PASSWORD). CHANGE THIS.
data_volume string
"microbin_data"
Named volume for pastas, uploaded files, and the database (/app/microbin_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    = 200
    memory = 128
  }
The task resources.
Readme

microbin

MicroBin — a tiny, feature-rich, self-contained pastebin and file-sharing web app: share text and files with expiry, encryption, QR codes, and a built-in URL shortener.

Single host-networked Nomad service with a data volume.

Deploy

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

Configure

Variable Default Description
port 8109 Web UI port (MICROBIN_PORT).
public_url "" MICROBIN_PUBLIC_PATH for links/QR; empty = http://localhost:<port>.
admin_username / admin_password admin / changeme-please Admin login. Change the password.
data_volume microbin_data /app/microbin_data — pastas, files, database.
image danielszabo99/microbin:latest Image. Pin a tag in production.
resources { cpu = 200, memory = 128 } Task resources.

Set public_url to the URL you serve it on so shared links and QR codes resolve. See also the opengist pack (Git-powered gists). Pin the job to the node holding the volume with constraints.