Redis — an in-memory data store used as a database, cache, and message broker, deployed as a host-networked Nomad service with AOF persistence on a Docker volume.
Save as values.hcl, edit, then run:
# The name of the Nomad job.
job_name = "redis"
# The Nomad namespace to deploy into.
namespace = "default"
# The datacenters to deploy to.
datacenters = ["*"]
# The Redis container image.
image = "redis:7-alpine"
# Host port Redis listens on (host networking). Pick a free port on the target node.
port = 6379
# Number of instances (keep at 1 — local-disk AOF, no built-in clustering here).
count = 1
# Optional requirepass password. Empty = no auth (only safe on a private/overlay network).
password = ""
# Docker named volume for /data, so the AOF/RDB survives restarts and reschedules.
data_volume = "redis_data"
# Placement constraints — e.g. 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.
resources = {
cpu = 300
memory = 256
}
| Name | Type | Default | Description |
|---|---|---|---|
| job_name | string | "redis" | The name of the Nomad job. |
| namespace | string | "default" | The Nomad namespace to deploy into. |
| datacenters | list | ["*"] | The datacenters to deploy to. |
| image | string | "redis:7-alpine" | The Redis container image. |
| port | number | 6379 | Host port Redis listens on (host networking). Pick a free port on the target node. |
| count | number | 1 | Number of instances (keep at 1 — local-disk AOF, no built-in clustering here). |
| password key | string | "" | Optional requirepass password. Empty = no auth (only safe on a private/overlay network). |
| data_volume | string | "redis_data" | Docker named volume for /data, so the AOF/RDB survives restarts and reschedules. |
| constraints | list | [] | Placement constraints — e.g. 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 = 300
memory = 256
} | The task resources. |
No variables match.
Redis as a host-networked Nomad service with AOF persistence on a Docker
named volume.
nomad-pack registry add nomploy github.com/Nomploy/nomad-packs
nomad-pack run redis --registry nomploy --var password=change-me
Or in nomploy: Create → Nomad Pack, pick redis from the Nomploy registry.
| Variable | Default | Description |
|---|---|---|
job_name |
redis |
Nomad job name |
image |
redis:7-alpine |
Container image |
port |
6379 |
Host port (pick a free one per node) |
count |
1 |
Keep at 1 (local-disk AOF) |
password |
"" |
requirepass password; empty = no auth |
data_volume |
redis_data |
Docker named volume for /data |
constraints |
[] |
Pin placement so the local volume stays put |
resources |
{cpu=300, memory=256} |
Task resources |
--appendonly yes) and stored on a Docker named
volume, so data survives restarts and reschedules. Pin the job with constraints
so it lands on the node holding the volume.password empty only on a trusted private/overlay network.