Reference

Configuration

Every option in oke.config.ts — three environments (dev · test · prod), drivers, images, i18n, tenancy, privacy, db sync, topology, ports, and console.

Complete reference for oke.config.ts. Options below match defineConfig. Driver maps use three keys: dev · test · prod.

oke.config.ts
import { defineConfig } from "okengine/config";

export default defineConfig({
  // options below
});

The one rule

Pin drivers and images in oke.config.ts for dev · test · prod. We test on what we deploy: Docker-first local stack, PGLite for tests, same protocol ids in production.

Environments

KeyWhenTypical backends
devoke dev (Docker Compose)Same protocols as prod (Postgres, Redis, S3, SMTP, …)
testoke test / bun testPGLite for SQL; memory / frozen / console elsewhere
prodProduction deployShared durable backends

Missing dev pins fill from prod (fillDevFromProd). Only dev / test / prod keys are valid — rename localdev and dockerprod if you still have the old maps.

Quick start

Pin drivers for three envs

Pin only the env keys that differ from the built-in defaults — omitted keys keep DRIVER_DEFAULTS. create-oke templates ship that sparse shape:

oke.config.ts
import { defineConfig } from "okengine/config";

export default defineConfig({
  drivers: {
    // Default vault.dev is "env"; pin the built-in store for Docker-first apps.
    vault: { dev: "vault" },
  },
});

Or use a string shorthand

A bare string (or { driver, … } object) expands to all three envs:

drivers: {
  signal: "redis", // → { dev: "redis", test: "redis", prod: "redis" }
},

Prefer an explicit { dev, test, prod } map (or a partial override) when test should differ from the default for that driver.

Run and test

Terminal
oke dev    # Docker Compose + host Bun · drivers.dev
oke test   # bun test · NODE_ENV=test · OKE_PGLITE_URL=memory://

Default driver maps

Built-in defaults (DRIVER_DEFAULTS) when a key is omitted:

Mapdevtestprod
store.sqlpostgrespglitepostgres
store.kvredismemoryredis
store.filess3memorys3
signalredismemoryredis
clockpostgresfrozenpostgres
journalpostgresmemorypostgres
vaultenvmemoryvault
channel.emailsmtpconsolesmtp
channel.sms— (opt-in)
runsfilesmemoryfiles

store.index, channel.whatsapp / push, and ai have no single three-env default table — set them explicitly when you need them. create-oke templates pin vault.dev: "vault" (built-in) because the default dev driver is env.

Driver keys and ids

KeyShapeDriver ids
store.sqlenv driver mappostgres · pglite · memory
store.kvenv driver mapmemory · redis
store.filesenv driver mapmemory · fs · s3
store.indexenv driver mapmemory · pgvector · meilisearch
signalenv driver mapmemory · redis (boot); postgres · nats fail loud until clients bind
clockenv driver mapmemory · postgres · file · frozen
journalenv driver mapmemory · file · postgres
vaultenv driver mapenv · vault · memory · managed
channel.emailenv driver mapconsole · smtp · resend · sndr · taqnyat-mail
channel.smsenv driver mapconsole · taqnyat · msegat · unifonic
channel.whatsappenv driver mapconsole · wa-cloud
channel.pushenv driver mapconsole · webpush · fcm
aienv driver mapmock · anthropic · openai-compatible · bedrock · vertex
runsenv driver mapmemory · files (Parquet + DuckDB at .oke/runs) · postgres · clickhouse
prodstring[]flat protocol list for the Manifest — nested maps are preferred

Safety rules

defineConfig rejects unsafe pins:

  • sqlite is removed — use postgres (dev/prod) or pglite (test).
  • drivers.store.sql.test must be pglite when set — real Postgres semantics in tests.

Rich driver objects

sql: {
  prod: { driver: "postgres", pool: { max: 20 }, replicas: ["postgres://ro-1/db"] },
},
FieldTypeMeaning
urlconnection stringOverrides the env-var resolution
pool{ max?, min? }SQL pool sizing
replicasstring[]Read-only routing targets (read flows only)

images

Nested pins by element role — vendor choice lives here, never in driver ids:

images: {
  store: {
    sql: "postgres:18-alpine",
    kv: "redis:8-alpine",
    files: "rustfs/rustfs:1.0.0-rc.5",
  },
  channel: { email: "axllent/mailpit:v1.31.1" },
  pgdog: "ghcr.io/pgdogdev/pgdog:v0.1.57",
  // proxy: "caddy:2-alpine",
},

Omitted image keys mean no container for that role. When both store.sql and pgdog are pinned, DATABASE_URL points at PgDog — see Store.

For store.kv, pin Redis (default), Valkey, or Dragonfly — driver id stays redis. { durable: true } KV lives in SQL (oke_kv on DATABASE_URL), not a second Redis image.

Compose does not manage AI inference — OpenRouter or BYO OKE_AI_URL (Models). For proxy, see Caddy, Traefik, or nginx.

i18n

OptionTypeDefaultMeaning
localesstring[]["en"] when omittedSupported locales
defaultstring"en" when omittedFallback locale (channel templates, fx.t)
dirrecordPer-locale direction: "ltr" | "rtl"
i18n: { locales: ["en"], default: "en" },
// or with Arabic: { locales: ["en", "ar"], default: "en", dir: { ar: "rtl" } }

tenancy

oke.config.ts tenancy is isolation posture (how rows are separated). Identity — who the tenant is — is gate.auth.tenant on Gate.

OptionTypeMeaning
isolation"row" | "schema" | "database"How tenants are separated in the store
resolvestring | functionObservational resolver (isolation-only manifests)

privacy

Presence of this block turns CORE privacy tooling on in the Console — not a .plug() call.

privacy: {},

runs

Runs retention and redaction — not the same key as drivers.runs.

OptionTypeMeaning
keepstring | "forever"Delete Parquet partitions older than this (7d in dev, 30d in prod)
redactRecord<string, string>Field → retention duration; presence turns privacy on

db

Domain schema sync for oke db push | generate | migrate (Drizzle). Unrelated to oke schema generate.

OptionDefaultMeaning
autoPushtrueAuto-run db push on schema change under oke dev; forced off in prod
config"drizzle.config.ts"Path to the drizzle-kit config
declare"src/db/schema.decl.ts"Abstract schema module (store.schema.table exports)
generated"src/db/schema.drizzle.ts"Where oke db emits dialect Drizzle
entrysrc/app.tsApp entry for collecting plugin table contributions

topology

ValueMeaning
"monolith"One process serves everything (default posture)
"services"Split deployment units derived from the Manifest

ports

OptionDefaultSurface
app6530Backend
console6533Console
mcp6535MCP

console

OptionTypeDefaultMeaning
prod.enabledbooleanServe the Console in prod
prod.auth"required" | "optional" | "none"Access requirement

Troubleshooting

Learn more

  • CLIoke dev · oke test · oke db
  • Environment Variables — URL and secret resolution
  • Store — what the store drivers back
  • i18n — locale catalogs beyond the config block

Next

On this page