Nomploy Nomad Packs

← All packs

typesense v0.1.0

Search

Typesense — a fast, typo-tolerant open-source search engine (an open alternative to Algolia/Elasticsearch) with a simple API and instant search. Deployed as a host-networked Nomad service with a persistent volume.

nomad-pack run typesense --registry nomploy
1 task http 8108 1 volume image typesense/typesense:27.1
Variables 9
values.hcl

Save as values.hcl, edit, then run:

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

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

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

# The Typesense container image. Pin a tag in production.
image = "typesense/typesense:27.1"

# Host port for the Typesense HTTP API.
port = 8108

# Admin API key — required. CHANGE THIS; clients send it in the X-TYPESENSE-API-KEY header.
api_key = "changeme"

# Docker named volume for /data (the search index). Typesense runs as root, so a fresh volume is writable. Back it up (or re-index).
data_volume = "typesense_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. Typesense keeps indexes in memory — raise for large datasets.
resources = {
    cpu    = 500
    memory = 512
  }
NameTypeDefaultDescription
job_name string
"typesense"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"typesense/typesense:27.1"
The Typesense container image. Pin a tag in production.
port number
8108
Host port for the Typesense HTTP API.
api_key set me string
"changeme"
Admin API key — required. CHANGE THIS; clients send it in the X-TYPESENSE-API-KEY header.
data_volume string
"typesense_data"
Docker named volume for /data (the search index). Typesense runs as root, so a fresh volume is writable. Back it up (or re-index).
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. Typesense keeps indexes in memory — raise for large datasets.
Readme

typesense

Typesense — a fast, typo-tolerant open-source search engine, an open alternative to Algolia/Elasticsearch with a simple API and instant, relevant results. Host-networked Nomad service with a persistent volume.

Usage

nomad-pack registry add nomploy github.com/Nomploy/nomad-packs
nomad-pack run typesense --registry nomploy --var api_key=<secret>

In nomploy: create a Compose service, type Nomad Pack, pack typesense, set api_key, then Deploy. API at http://<node-ip>:8108 (send X-TYPESENSE-API-KEY).

Key variables

Variable Default Notes
image typesense/typesense:27.1 Pin a tag in production.
port 8108 HTTP API.
api_key changeme Required admin key — change it.
data_volume typesense_data The search index. Back it up.
constraints [] Pin to a node so the local volume stays put.
resources cpu 500 / mem 512 Raise memory for large indexes.

Notes