Nomploy Nomad Packs

← All packs

directus v0.1.0

Apps

Directus — an open-source headless CMS and data platform that wraps any SQL database with a REST/GraphQL API and a no-code admin app. Deployed all-in-one with PostgreSQL in a single host-networked Nomad job, with a persistent volume for uploads.

nomad-pack run directus --registry nomploy
3 tasks http 8055db 5432 2 volumes image directus/directus:latest
Variables 18
values.hcl

Save as values.hcl, edit, then run:

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

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

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

# The Directus container image. Pin a tag in production.
image = "directus/directus:latest"

# Host port for the Directus app / API.
port = 8055

# Unique KEY for this instance (any random string). CHANGE THIS and keep it stable.
key = "CHANGE_ME_directus_key"

# SECRET used to sign tokens (any random string). CHANGE THIS and keep it stable.
secret = "CHANGE_ME_directus_secret"

# First admin email, created on first boot.
admin_email = "admin@example.com"

# First admin password, created on first boot. CHANGE THIS.
admin_password = "admin"

# Public URL Directus is served at (PUBLIC_URL), e.g. https://cms.example.com. Empty = leave unset.
public_url = ""

# Docker named volume for /directus/uploads (files/assets). A prestart task chowns it to uid 1000 (the node user). Back it up.
uploads_volume = "directus_uploads"

# Resources for the Directus task.
directus_resources = {
    cpu    = 500
    memory = 512
  }

# PostgreSQL image backing Directus.
postgres_image = "postgres:16-alpine"

# Host port PostgreSQL listens on. Directus connects on 127.0.0.1.
db_port = 5432

# Password for the Directus Postgres user. CHANGE THIS. (DB name and user are both "directus".)
db_password = "directus"

# Docker named volume for the Postgres data dir (collections, users, config). Back it up.
db_data_volume = "directus_db_data"

# Resources for the PostgreSQL task.
postgres_resources = {
    cpu    = 500
    memory = 512
  }

# Placement constraints — pin the job to one node so the local volumes stay put. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []
NameTypeDefaultDescription
job_name string
"directus"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"directus/directus:latest"
The Directus container image. Pin a tag in production.
port number
8055
Host port for the Directus app / API.
key set me string
"CHANGE_ME_directus_key"
Unique KEY for this instance (any random string). CHANGE THIS and keep it stable.
secret set me string
"CHANGE_ME_directus_secret"
SECRET used to sign tokens (any random string). CHANGE THIS and keep it stable.
admin_email set me string
"admin@example.com"
First admin email, created on first boot.
admin_password key string
"admin"
First admin password, created on first boot. CHANGE THIS.
public_url string
""
Public URL Directus is served at (PUBLIC_URL), e.g. https://cms.example.com. Empty = leave unset.
uploads_volume string
"directus_uploads"
Docker named volume for /directus/uploads (files/assets). A prestart task chowns it to uid 1000 (the node user). Back it up.
directus_resources object
{
    cpu    = 500
    memory = 512
  }
Resources for the Directus task.
postgres_image string
"postgres:16-alpine"
PostgreSQL image backing Directus.
db_port number
5432
Host port PostgreSQL listens on. Directus connects on 127.0.0.1.
db_password key string
"directus"
Password for the Directus Postgres user. CHANGE THIS. (DB name and user are both "directus".)
db_data_volume string
"directus_db_data"
Docker named volume for the Postgres data dir (collections, users, config). Back it up.
postgres_resources object
{
    cpu    = 500
    memory = 512
  }
Resources for the PostgreSQL task.
constraints list
[]
Placement constraints — pin the job to one node so the local volumes stay put. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
Readme

directus

Directus — an open-source headless CMS and data platform: point it at a SQL database and get an instant REST + GraphQL API plus a polished no-code admin app. All-in-one: Directus plus PostgreSQL in a single host-networked Nomad job (Postgres as a prestart sidecar). It bootstraps the schema and admin on first start.

Usage

nomad-pack registry add nomploy github.com/Nomploy/nomad-packs
nomad-pack run directus --registry nomploy \
  --var key=$(openssl rand -hex 16) --var secret=$(openssl rand -hex 16) \
  --var admin_password=<secret>

In nomploy: create a Compose service, type Nomad Pack, pack directus, set key/secret/admin_password, then Deploy. Open http://<node-ip>:8055 and log in.

Key variables

Variable Default Notes
image directus/directus:latest Pin a tag in production.
port 8055 App / API.
key / secret placeholders Change both (random strings) and keep them stable.
admin_email / admin_password admin@example.com / admin First admin, first boot only. Change the password.
public_url "" Public URL when behind a domain.
db_password directus Postgres password. Change this.
db_data_volume / uploads_volume directus_* Back both up.
db_port 5432 Bundled Postgres host port.
constraints [] Pin to a node so the volumes stay put.

Per-task resources: directus_resources, postgres_resources.

Notes