Nomploy Nomad Packs

← All packs

dragonfly v0.1.0

Databases

DragonflyDB — a modern, multi-threaded in-memory datastore that is drop-in compatible with the Redis and Memcached APIs, built for high throughput on a single node. Deployed as a host-networked Nomad service with snapshots on a persistent volume.

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

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

1 task db 6379 1 volume image docker.dragonflydb.io/dragonflydb/dragonfly:latest tracks :latest image bumped 28 days ago
Variables 9
values.hcl

Save as values.hcl, edit, then run:

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

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

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

# The DragonflyDB container image. Pin a tag in production.
image = "docker.dragonflydb.io/dragonflydb/dragonfly:latest"

# Host port Dragonfly listens on (Redis/Memcached-compatible).
port = 6379

# Optional password (--requirepass). Empty = no auth (fine on a trusted network).
password = ""

# Docker named volume for /data (snapshots). Dragonfly runs as root, so a fresh volume is writable. Back it up.
data_volume = "dragonfly_data"

# Placement constraints — pin to one node so the local volume stays put. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []

# The task resources. Dragonfly is multi-threaded and memory-first — give it real memory (docs suggest 4GB+ to see its benefits).
resources = {
    cpu    = 1000
    memory = 1024
  }
NameTypeDefaultDescription
job_name string
"dragonfly"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"docker.dragonflydb.io/dragonflydb/dragonfly:latest"
The DragonflyDB container image. Pin a tag in production.
port number
6379
Host port Dragonfly listens on (Redis/Memcached-compatible).
password key string
""
Optional password (--requirepass). Empty = no auth (fine on a trusted network).
data_volume string
"dragonfly_data"
Docker named volume for /data (snapshots). Dragonfly runs as root, so a fresh volume is writable. Back it up.
constraints list
[]
Placement constraints — pin to one node so the local volume stays put. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
resources object
{
    cpu    = 1000
    memory = 1024
  }
The task resources. Dragonfly is multi-threaded and memory-first — give it real memory (docs suggest 4GB+ to see its benefits).
Back up this pack

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

rclone (sync to S3/R2)

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

dragonfly

DragonflyDB — a modern, multi-threaded in-memory datastore that's drop-in compatible with the Redis and Memcached APIs, designed for very high throughput on a single node. Host-networked Nomad service with snapshots on a persistent volume.

Usage

nomad-pack registry add nomploy github.com/Nomploy/nomad-packs
nomad-pack run dragonfly --registry nomploy

In nomploy: create a Compose service, type Nomad Pack, pack dragonfly, custom registry github.com/Nomploy/nomad-packs, then Deploy. Point any Redis client at <node-ip>:6379.

Key variables

Variable Default Notes
image docker.dragonflydb.io/dragonflydb/dragonfly:latest Pin a tag in production.
port 6379 Listen port (Redis-compatible).
password "" Empty = open; set --requirepass.
data_volume dragonfly_data Snapshots. Back it up.
constraints [] Pin to a node so the local volume stays put.
resources cpu 1000 / mem 1024 Give it real memory — Dragonfly shines with 4GB+.

Notes