Nomploy Nomad Packs

← All packs

neo4j v0.1.0

Databases

Neo4j — the popular open-source graph database, with the Cypher query language and the Neo4j Browser UI. Deployed as a host-networked Nomad service with a persistent volume for the graph store.

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

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

2 tasks http 7474bolt 7687 1 volume image neo4j:5 pinned :5 image bumped 28 days ago
Variables 10
values.hcl

Save as values.hcl, edit, then run:

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

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

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

# The Neo4j container image. Pin a tag in production.
image = "neo4j:5"

# Host port for the Neo4j Browser / HTTP API.
http_port = 7474

# Host port for the Bolt protocol (drivers connect here).
bolt_port = 7687

# Initial password for the built-in `neo4j` user (min 8 chars; must NOT be "neo4j"). CHANGE THIS.
password = "changeme123"

# Docker named volume for /data (the graph store). A prestart task chowns it to uid 7474 (the neo4j user). Back it up.
data_volume = "neo4j_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. Neo4j (JVM) likes memory — raise for larger graphs.
resources = {
    cpu    = 1000
    memory = 1024
  }
NameTypeDefaultDescription
job_name string
"neo4j"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"neo4j:5"
The Neo4j container image. Pin a tag in production.
http_port number
7474
Host port for the Neo4j Browser / HTTP API.
bolt_port number
7687
Host port for the Bolt protocol (drivers connect here).
password set me string
"changeme123"
Initial password for the built-in `neo4j` user (min 8 chars; must NOT be "neo4j"). CHANGE THIS.
data_volume string
"neo4j_data"
Docker named volume for /data (the graph store). A prestart task chowns it to uid 7474 (the neo4j user). 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. Neo4j (JVM) likes memory — raise for larger graphs.
Back up this pack

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

rclone (sync to S3/R2)

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

neo4j

Neo4j — the popular open-source graph database, with the Cypher query language and the Neo4j Browser UI. Great for connected data: social graphs, recommendations, fraud, knowledge graphs. Host-networked Nomad service with a persistent volume.

Usage

nomad-pack registry add nomploy github.com/Nomploy/nomad-packs
nomad-pack run neo4j --registry nomploy --var password=<8+ chars>

In nomploy: create a Compose service, type Nomad Pack, pack neo4j, set password, then Deploy. Open the Browser at http://<node-ip>:7474 (login neo4j / your password); drivers connect via Bolt at bolt://<node-ip>:7687.

Key variables

Variable Default Notes
image neo4j:5 Pin a tag in production.
http_port / bolt_port 7474 / 7687 Browser/HTTP + Bolt.
password changeme123 Initial neo4j password — ≥ 8 chars, not "neo4j". Change it.
data_volume neo4j_data Graph store. Back it up.
constraints [] Pin to a node so the local volume stays put.
resources cpu 1000 / mem 1024 JVM — raise for larger graphs.

Notes