Recipes

Meilisearch

Full-text store.index image — OKE_STORE_INDEX_URL, OKE_STORE_INDEX_KEY / MEILI_MASTER_KEY, /meili_data volume.

Meilisearch backs the meilisearch index driver — typo-tolerant full-text search over HTTP. Pin images.store.index and set drivers.store.index to meilisearch where you need it (index does not auto-promote under Compose).

The one rule

Index stays memory in every environment until you set the driver map explicitly — there is no silent fallback to Meilisearch or pgvector.

Quick start

Declare driver + image

oke.config.ts
drivers: {
  store: {
    index: { dev: "meilisearch", test: "memory", prod: "meilisearch" },
  },
},
images: {
  store: { index: "getmeili/meilisearch:v1.53" },
},

Keys written by oke docker

.env.local
OKE_STORE_INDEX_URL=http://127.0.0.1:7700
OKE_STORE_INDEX_KEY=          # also accepted as MEILI_MASTER_KEY

Recipe injects into the container:

  • MEILI_MASTER_KEY=${OKE_STORE_INDEX_KEY}
  • MEILI_ENV=${OKE_MEILI_ENV:-production}
  • MEILI_NO_ANALYTICS=true

Search from a flow

Use store.index(…) without { dims } for full-text (vector dims select pgvector). Writes wait on Meilisearch tasks before returning.

Required env

VariableRequired?Meaning
OKE_STORE_INDEX_URLYesBase URL — boot fails without it
OKE_STORE_INDEX_KEYYes (production)Master/API key; falls back to MEILI_MASTER_KEY
MEILI_MASTER_KEYAlternateSame secret, container-side name
OKE_MEILI_ENVOptionalPassed as MEILI_ENV (default production)

Data and backup

VolumePathWhat it stores
store-index-data/meili_dataIndexes, documents, settings

Backup means: snapshot/restore that named volume (or Meilisearch dumps). Recreating the container keeps data if the volume remains; deleting the volume wipes every index.

The master key is not inside the volume — it lives in .env.local / secrets. Losing the key without a backup blocks admin API access even if data remains.

Production note

Always set a non-empty OKE_STORE_INDEX_KEY when MEILI_ENV=production — Meilisearch refuses insecure production mode without a master key. Prefer network isolation (compose network only) plus the key; do not publish :7700 on the public internet without auth.

Vector ai.embed into a meilisearch index fails loud — embeddings need pgvector, not FTS. See Store · Index.

What the recipe configures

FieldValue
Container port7700
Healthcheckwget against /health, every 5s, 12 retries
Connection URLhttp://host:7700

Troubleshooting

Learn more

Next

On this page