Recipes

Dragonfly

Default store.kv image — multi-threaded Redis-wire runtime, memlock ulimit, OKE_STORE_KV_PASSWORD.

Dragonfly is the default store.kv image in dev and prod: a multi-threaded Redis-protocol engine. Same redis:// wire format and the same redis driver, so Flows do not change. Pin Redis or Valkey when you want those engines instead.

The one rule

Driver id stays redis. Dragonfly is an image choice — every KV call through fx.store behaves identically to Redis or Valkey at the protocol layer.

Quick start

Pin the image

oke.config.ts
images: {
  "store.kv": "docker.dragonflydb.io/dragonflydb/dragonfly:v2.0.0",
},

Password + memory

OKE_STORE_KV_PASSWORD=…
OKE_STORE_KV_MAXMEMORY=256mb   # optional; recipe passes --maxmemory
REDIS_URL=redis://:…@127.0.0.1:6379

Command: dragonfly --requirepass "$OKE_STORE_KV_PASSWORD" --maxmemory "…".

Unlike Redis/Valkey, this recipe does not pass --maxmemory-policy — Dragonfly's own defaults apply.

memlock ulimit

The recipe sets ulimits.memlock: -1 — required for Dragonfly's shared-nothing design. If the host forbids unlimited memlock, the container may fail to start.

Required env

VariableRequired?Meaning
OKE_STORE_KV_PASSWORDYes--requirepass
REDIS_URLYes (app)redis:// URL for the driver
OKE_STORE_KV_MAXMEMORYOptional--maxmemory (default 0 in the command template)
HEALTHCHECK_PORTSet by recipe6379 — used by the image's healthcheck script

Data and backup

The default store.kv recipe declares no named volume — ephemeral, same as Redis/Valkey.

Keys that must survive go on { durable: true } — a JSONB table on your SQL database. Dragonfly snapshots are not involved. See Store · Durable KV.

Production note

BSL 1.1 — converts to Apache 2.0 on a published change date per release. Free for self-hosting; the BSL terms restrict offering Dragonfly itself as a commercial managed service to third parties — running it for your own app is unaffected.

Multi-threaded architecture makes better use of multi-core hosts than single-threaded Redis under heavy concurrent load. For a managed endpoint with TLS + passkey, see Dragonfly Cloud.

What the recipe configures

FieldValue
Container port6379
ulimitsmemlock: -1
Healthcheck/usr/local/bin/healthcheck.sh, every 5s, 10 retries
Connection URLredis://:pass@host:6379

Troubleshooting

Learn more

Next

On this page