Nomploy Nomad Packs

← All packs

pocketbase v0.1.0

Dev tools

PocketBase — an open-source backend in a single file: an embedded SQLite database with realtime subscriptions, built-in auth, file storage, and an admin dashboard, exposed over a REST-ish API. Deployed as a host-networked Nomad service with a persistent volume.

nomad-pack run pocketbase --registry nomploy
1 task http 8090 1 volume image ghcr.io/muchobien/pocketbase:latest
Variables 8
values.hcl

Save as values.hcl, edit, then run:

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

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

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

# The PocketBase container image. PocketBase has no official image; this is the widely-used community build. Pin a tag in production.
image = "ghcr.io/muchobien/pocketbase:latest"

# Host port for PocketBase (admin UI at /_/ and the REST/realtime API).
port = 8090

# Docker named volume for /pb_data (SQLite database, uploaded files, settings). All of PocketBase's state. Back it up.
data_volume = "pocketbase_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    = 300
    memory = 256
  }
NameTypeDefaultDescription
job_name string
"pocketbase"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"ghcr.io/muchobien/pocketbase:latest"
The PocketBase container image. PocketBase has no official image; this is the widely-used community build. Pin a tag in production.
port number
8090
Host port for PocketBase (admin UI at /_/ and the REST/realtime API).
data_volume string
"pocketbase_data"
Docker named volume for /pb_data (SQLite database, uploaded files, settings). All of PocketBase's state. 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    = 300
    memory = 256
  }
The task resources.
Readme

pocketbase

PocketBase — an open-source backend in a single file: an embedded SQLite database with realtime subscriptions, built-in authentication, file storage, and an admin dashboard, all behind a simple REST-ish API. A lightweight Firebase/BaaS alternative for small apps and prototypes. Host-networked Nomad service with a persistent volume.

Usage

nomad-pack registry add nomploy github.com/Nomploy/nomad-packs
nomad-pack run pocketbase --registry nomploy

In nomploy: create a Compose service, type Nomad Pack, pack pocketbase, custom registry github.com/Nomploy/nomad-packs, then Deploy.

Open http://<node-ip>:8090/_/ and create the superuser account on first visit.

Key variables

Variable Default Notes
image ghcr.io/muchobien/pocketbase:latest Community image (no official one). Pin a tag in production.
port 8090 Admin UI (/_/) + API (/api/).
data_volume pocketbase_data SQLite DB + uploaded files. Back it up.
constraints [] Pin to a node so the local volume stays put.
resources cpu 300 / mem 256 Lightweight.

Notes