Ghost — a professional publishing platform for blogs, newsletters, and paid memberships. Deployed all-in-one with its MySQL 8 database in a single host-networked Nomad job, with a persistent volume for content (themes, images, data).
Save as values.hcl, edit, then run:
# The name of the Nomad job.
job_name = "ghost"
# The Nomad namespace to deploy into.
namespace = "default"
# The datacenters to deploy to.
datacenters = ["*"]
# The Ghost container image. Pin a tag in production.
image = "ghost:5-alpine"
# Host port for Ghost (site + /ghost admin).
port = 2368
# Public URL Ghost is served at (e.g. https://blog.example.com). Ghost bakes this into links, so set it correctly. Empty = http://localhost:<port>.
url = ""
# Docker named volume for /var/lib/ghost/content (themes, images, uploads). A prestart task chowns it to uid 1000 (the node user). Back it up.
content_volume = "ghost_content"
# Resources for the Ghost task.
ghost_resources = {
cpu = 500
memory = 512
}
# MySQL image. Ghost 5 requires MySQL 8 (MariaDB is not supported).
mysql_image = "mysql:8"
# Host port MySQL listens on. Ghost connects on 127.0.0.1.
db_port = 3306
# Password for Ghost's MySQL user. CHANGE THIS. (DB name and user are both "ghost".)
db_password = "ghost"
# MySQL root password. CHANGE THIS.
db_root_password = "ghost"
# Docker named volume for /var/lib/mysql (the database — posts, members, settings). Back it up.
db_data_volume = "ghost_db_data"
# Resources for the MySQL task.
mysql_resources = {
cpu = 500
memory = 1024
}
# 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 = []
| Name | Type | Default | Description |
|---|---|---|---|
| job_name | string | "ghost" | The name of the Nomad job. |
| namespace | string | "default" | The Nomad namespace to deploy into. |
| datacenters | list | ["*"] | The datacenters to deploy to. |
| image | string | "ghost:5-alpine" | The Ghost container image. Pin a tag in production. |
| port | number | 2368 | Host port for Ghost (site + /ghost admin). |
| url | string | "" | Public URL Ghost is served at (e.g. https://blog.example.com). Ghost bakes this into links, so set it correctly. Empty = http://localhost:<port>. |
| content_volume | string | "ghost_content" | Docker named volume for /var/lib/ghost/content (themes, images, uploads). A prestart task chowns it to uid 1000 (the node user). Back it up. |
| ghost_resources | object | {
cpu = 500
memory = 512
} | Resources for the Ghost task. |
| mysql_image | string | "mysql:8" | MySQL image. Ghost 5 requires MySQL 8 (MariaDB is not supported). |
| db_port | number | 3306 | Host port MySQL listens on. Ghost connects on 127.0.0.1. |
| db_password key | string | "ghost" | Password for Ghost's MySQL user. CHANGE THIS. (DB name and user are both "ghost".) |
| db_root_password key | string | "ghost" | MySQL root password. CHANGE THIS. |
| db_data_volume | string | "ghost_db_data" | Docker named volume for /var/lib/mysql (the database — posts, members, settings). Back it up. |
| mysql_resources | object | {
cpu = 500
memory = 1024
} | Resources for the MySQL 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". |
No variables match.
Ghost — a professional publishing platform for blogs, newsletters, and paid memberships. All-in-one: Ghost plus its MySQL 8 database in a single host-networked Nomad job (Ghost 5 requires MySQL 8 — MariaDB isn't supported). MySQL runs as a prestart sidecar; Ghost migrates on start.
nomad-pack registry add nomploy github.com/Nomploy/nomad-packs
nomad-pack run ghost --registry nomploy --var 'url=https://blog.example.com'
In nomploy: create a Compose service, type Nomad Pack, pack ghost, set url, then
Deploy. Open <url>/ghost and create the owner account.
| Variable | Default | Notes |
|---|---|---|
image |
ghost:5-alpine |
Pin a tag in production. |
port |
2368 |
Site + admin. |
url |
"" |
Public URL — set it (Ghost bakes it into links); empty → http://localhost:<port>. |
db_password / db_root_password |
ghost |
MySQL creds. Change them. |
content_volume |
ghost_content |
Themes/images/uploads. Back it up. |
db_data_volume |
ghost_db_data |
The database. Back it up. |
db_port |
3306 |
Bundled MySQL host port. |
constraints |
[] |
Pin to a node so the volumes stay put. |
Per-task resources: ghost_resources, mysql_resources.
count is fixed to 1 (local MySQL + content volumes). A prestart task
chowns the content volume to uid 1000 (the node user). Pin with constraints.mail__* env or Ghost's
settings after first boot (not set here).url to the HTTPS address.