Apache CouchDB — a document database with a JSON document model, an HTTP/REST API, and multi-master replication (great for offline-first / sync apps). Deployed as a host-networked Nomad service with a persistent volume and the Fauxton admin UI.
Save as values.hcl, edit, then run:
# The name of the Nomad job.
job_name = "couchdb"
# The Nomad namespace to deploy into.
namespace = "default"
# The datacenters to deploy to.
datacenters = ["*"]
# The Apache CouchDB container image. Pin a tag in production.
image = "couchdb:3"
# Host port for the CouchDB HTTP API (and Fauxton UI at /_utils).
port = 5984
# Admin username, created on first boot.
admin_user = "admin"
# Admin password, created on first boot. CHANGE THIS.
admin_password = "couchdb"
# Docker named volume for /opt/couchdb/data (the databases). A prestart task chowns it to uid 5984 (the couchdb user). Back it up.
data_volume = "couchdb_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.
resources = {
cpu = 500
memory = 512
}
| Name | Type | Default | Description |
|---|---|---|---|
| job_name | string | "couchdb" | The name of the Nomad job. |
| namespace | string | "default" | The Nomad namespace to deploy into. |
| datacenters | list | ["*"] | The datacenters to deploy to. |
| image | string | "couchdb:3" | The Apache CouchDB container image. Pin a tag in production. |
| port | number | 5984 | Host port for the CouchDB HTTP API (and Fauxton UI at /_utils). |
| admin_user | string | "admin" | Admin username, created on first boot. |
| admin_password key | string | "couchdb" | Admin password, created on first boot. CHANGE THIS. |
| data_volume | string | "couchdb_data" | Docker named volume for /opt/couchdb/data (the databases). A prestart task chowns it to uid 5984 (the couchdb 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 = 500
memory = 512
} | The task resources. |
No variables match.
Apache CouchDB — a document database with a JSON document model, a friendly HTTP/REST API, and multi-master replication (ideal for offline-first and sync apps, e.g. with PouchDB). Host-networked Nomad service with a persistent volume and the Fauxton admin UI.
nomad-pack registry add nomploy github.com/Nomploy/nomad-packs
nomad-pack run couchdb --registry nomploy --var admin_password=<secret>
In nomploy: create a Compose service, type Nomad Pack, pack couchdb, set
admin_password, then Deploy. Fauxton UI at http://<node-ip>:5984/_utils.
On a fresh single node, run the one-time single-node setup (see the deploy output) so the
_users/_replicator system databases are created.
| Variable | Default | Notes |
|---|---|---|
image |
couchdb:3 |
Pin a tag in production. |
port |
5984 |
HTTP API + Fauxton. |
admin_user / admin_password |
admin / couchdb |
Created on first boot. Change the password. |
data_volume |
couchdb_data |
The databases. Back it up. |
constraints |
[] |
Pin to a node so the local volume stays put. |
resources |
cpu 500 / mem 512 |
Raise for larger datasets. |
count is fixed to 1 (local volume). A prestart task chowns the volume to
uid 5984 (the couchdb user). Pin with constraints. (CouchDB also clusters — out of scope.)