okengine 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1 -1
- package/manifest.v1.schema.json +9 -1
- package/package.json +3 -3
- package/site/content/docs/console/runs.mdx +10 -0
- package/site/content/docs/console/traces.mdx +4 -0
- package/site/content/docs/elements/ai.mdx +54 -32
- package/site/content/docs/elements/channel.mdx +105 -14
- package/site/content/docs/elements/clock.mdx +1 -0
- package/site/content/docs/elements/flow.mdx +42 -8
- package/site/content/docs/get-started/basic-usage.mdx +5 -1
- package/site/content/docs/get-started/installation.mdx +9 -5
- package/site/content/docs/meta.json +2 -0
- package/site/content/docs/plugins/otp.mdx +58 -46
- package/site/content/docs/providers/azure-redis.mdx +85 -0
- package/site/content/docs/providers/cockroachdb.mdx +86 -0
- package/site/content/docs/providers/digitalocean-caching.mdx +88 -0
- package/site/content/docs/providers/dragonfly-cloud.mdx +82 -0
- package/site/content/docs/providers/elasticache.mdx +92 -0
- package/site/content/docs/providers/index.mdx +101 -0
- package/site/content/docs/providers/memorystore.mdx +89 -0
- package/site/content/docs/providers/meta.json +20 -0
- package/site/content/docs/providers/neon.mdx +115 -0
- package/site/content/docs/providers/redis-cloud.mdx +93 -0
- package/site/content/docs/providers/supabase.mdx +117 -0
- package/site/content/docs/providers/upstash.mdx +91 -0
- package/site/content/docs/providers/yugabytedb.mdx +95 -0
- package/site/content/docs/recipes/caddy.mdx +128 -0
- package/site/content/docs/recipes/cockroachdb.mdx +127 -0
- package/site/content/docs/recipes/dragonfly.mdx +125 -0
- package/site/content/docs/recipes/index.mdx +146 -0
- package/site/content/docs/recipes/llama-cpp.mdx +153 -0
- package/site/content/docs/recipes/mailpit.mdx +136 -0
- package/site/content/docs/recipes/meilisearch.mdx +139 -0
- package/site/content/docs/recipes/meta.json +31 -0
- package/site/content/docs/recipes/ollama.mdx +142 -0
- package/site/content/docs/recipes/openbao.mdx +141 -0
- package/site/content/docs/recipes/pgdog.mdx +137 -0
- package/site/content/docs/recipes/postgres.mdx +136 -0
- package/site/content/docs/recipes/redis.mdx +130 -0
- package/site/content/docs/recipes/rustfs.mdx +148 -0
- package/site/content/docs/recipes/sglang.mdx +105 -0
- package/site/content/docs/recipes/supabase-docker.mdx +145 -0
- package/site/content/docs/recipes/timescale.mdx +129 -0
- package/site/content/docs/recipes/traefik.mdx +136 -0
- package/site/content/docs/recipes/valkey.mdx +121 -0
- package/site/content/docs/recipes/vllm.mdx +106 -0
- package/site/content/docs/recipes/yugabytedb.mdx +135 -0
- package/site/content/docs/reference/cli.md +42 -6
- package/site/content/docs/reference/configuration.mdx +5 -3
- package/site/content/docs/reference/environment-variables.mdx +12 -12
- package/site/content/docs/reference/fx.mdx +38 -4
- package/src/auth/otp-capability.ts +14 -14
- package/src/cli/ai-setup/ai-setup.test.ts +32 -12
- package/src/cli/ai-setup/apply.ts +65 -23
- package/src/cli/ai-setup/catalog.ts +1316 -35
- package/src/cli/ai-setup/detect-ollama.ts +47 -0
- package/src/cli/ai-setup/index.ts +44 -7
- package/src/cli/ai-setup/prompts.ts +430 -486
- package/src/cli/ai-setup/recommend.test.ts +150 -50
- package/src/cli/ai-setup/recommend.ts +118 -101
- package/src/cli/ask-seed.test.ts +68 -0
- package/src/cli/ask-seed.ts +79 -0
- package/src/cli/db-seed-redact.test.ts +25 -0
- package/src/cli/db-seed.ts +36 -7
- package/src/cli/db.test.ts +1 -1
- package/src/cli/db.ts +2 -2
- package/src/cli/dev-controls.test.ts +107 -0
- package/src/cli/dev-controls.ts +354 -0
- package/src/cli/dev-schema-sync.ts +12 -4
- package/src/cli/dev.test.ts +50 -30
- package/src/cli/dev.ts +607 -66
- package/src/cli/drizzle-env.test.ts +40 -6
- package/src/cli/drizzle-env.ts +22 -1
- package/src/cli/ensure-drizzle-config.ts +6 -4
- package/src/cli/hero-meta.test.ts +13 -1
- package/src/cli/hero-meta.ts +28 -6
- package/src/cli/index.ts +5 -0
- package/src/cli/registry.ts +24 -0
- package/src/cli/replay.test.ts +105 -0
- package/src/cli/replay.ts +206 -0
- package/src/compiler/extract.ts +3 -3
- package/src/config/index.ts +3 -3
- package/src/console/server/claim.ts +3 -1
- package/src/console/ui/dist/assets/{index-ClX0ZCe5.js → index-D-9KFce5.js} +2 -2
- package/src/console/ui/dist/assets/panel-overview-CW0CQEc2.js +1 -0
- package/src/console/ui/dist/assets/panel-runs-BxuyDI3x.js +1 -0
- package/src/console/ui/dist/assets/{panel-signals-Dsxdu_AR.js → panel-signals-BXofbj7v.js} +1 -1
- package/src/console/ui/dist/assets/{panel-store-hy7O8HOs.js → panel-store-B8mH-arU.js} +1 -1
- package/src/console/ui/dist/assets/{panel-traces-CBiAe5go.js → panel-traces-DSA-ZWnf.js} +1 -1
- package/src/console/ui/dist/index.html +1 -1
- package/src/console/ui/overview/slo.ts +31 -3
- package/src/console/ui/overview/types.ts +6 -0
- package/src/console/ui/runs/errors.test.ts +53 -0
- package/src/console/ui/runs/errors.ts +88 -0
- package/src/console/ui/runs/index.ts +8 -0
- package/src/console/ui/runs/search.ts +16 -0
- package/src/console/ui/shell/panels/runs/RunsPanel.tsx +72 -1
- package/src/docker/ai-model-status.test.ts +101 -0
- package/src/docker/ai-model-status.ts +276 -0
- package/src/docker/compose-health.test.ts +115 -0
- package/src/docker/compose-health.ts +234 -0
- package/src/docker/compose.ts +24 -8
- package/src/docker/derive.ts +35 -9
- package/src/docker/docker.test.ts +304 -12
- package/src/docker/helpers.ts +56 -0
- package/src/docker/index.ts +52 -0
- package/src/docker/ollama-pull.ts +232 -0
- package/src/docker/recipes/cockroach.ts +24 -0
- package/src/docker/recipes/index.ts +32 -0
- package/src/docker/recipes/llama-cpp.ts +273 -0
- package/src/docker/recipes/ollama.ts +19 -23
- package/src/docker/recipes/pgdog.ts +4 -1
- package/src/docker/recipes/postgres.ts +5 -18
- package/src/docker/recipes/sglang.ts +55 -0
- package/src/docker/recipes/supabase.ts +21 -0
- package/src/docker/recipes/timescale.ts +18 -0
- package/src/docker/recipes/vllm.ts +44 -0
- package/src/docker/recipes/yugabyte.ts +23 -0
- package/src/docker/stack-id.test.ts +22 -0
- package/src/docker/stack-id.ts +38 -4
- package/src/docker/types.ts +15 -0
- package/src/drivers/ai-ollama.integration.test.ts +7 -4
- package/src/drivers/signal-engine.ts +10 -0
- package/src/drivers/signal-postgres.ts +24 -2
- package/src/drivers/signal-types.ts +10 -0
- package/src/elements/channel/fallback.test.ts +91 -0
- package/src/elements/channel/hard-bounce.test.ts +82 -0
- package/src/elements/channel/injection.test.ts +153 -0
- package/src/elements/channel/locale-ar.test.ts +102 -0
- package/src/elements/channel/otp-delivery.ts +5 -2
- package/src/elements/channel/receipts-ledger.test.ts +100 -0
- package/src/elements/channel/runtime.ts +24 -1
- package/src/elements/channel/test-helpers.ts +60 -0
- package/src/elements/channel/whatsapp-compliance.test.ts +124 -0
- package/src/elements/store/cache.ts +1 -1
- package/src/elements/store/emit-drizzle.ts +43 -9
- package/src/elements/store/runtime.ts +1 -1
- package/src/elements/store/schema-decl.test.ts +2 -0
- package/src/elements/store/schema-decl.ts +15 -0
- package/src/elements/store/seed.ts +1 -1
- package/src/index.ts +1 -0
- package/src/kernel/app.ts +118 -11
- package/src/kernel/boot-bind/signal.ts +6 -2
- package/src/kernel/boot-bind/store.ts +2 -1
- package/src/kernel/boot.test.ts +6 -5
- package/src/kernel/boot.ts +8 -3
- package/src/kernel/compensate.test.ts +131 -0
- package/src/kernel/correlation.test.ts +108 -0
- package/src/kernel/effect-timing.test.ts +82 -0
- package/src/kernel/flow.ts +38 -0
- package/src/kernel/fx-runs.test.ts +49 -0
- package/src/kernel/fx.test.ts +14 -0
- package/src/kernel/fx.ts +111 -1
- package/src/manifest/types.ts +8 -2
- package/src/plugins/auth-delivery.mailpit.integration.test.ts +1 -1
- package/src/plugins/auth-methods.security.test.ts +3 -3
- package/src/plugins/auth-methods.test.ts +1 -1
- package/src/plugins/index.ts +2 -2
- package/src/plugins/otp.test.ts +21 -19
- package/src/plugins/otp.ts +36 -34
- package/src/plugins/taqnyat.live.test.ts +3 -3
- package/src/runs/collect.ts +3 -0
- package/src/runs/export-otlp.ts +64 -0
- package/src/runs/index.ts +16 -0
- package/src/runs/parquet.ts +9 -0
- package/src/runs/types.ts +5 -0
- package/src/runs/window.test.ts +68 -0
- package/src/runs/window.ts +148 -0
- package/src/runtime/boot-warn.test.ts +45 -0
- package/src/runtime/boot-warn.ts +17 -0
- package/src/runtime/dev-request-log.ts +5 -5
- package/src/term.test.ts +95 -10
- package/src/term.ts +369 -14
- package/src/console/ui/dist/assets/panel-overview-DONDzBd2.js +0 -1
- package/src/console/ui/dist/assets/panel-runs-D5zf-D9c.js +0 -1
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "YugabyteDB"
|
|
3
|
+
description: "Distributed SQL (YSQL) — Connect → Application, port 5433, CA cert, YSQL vs YCQL."
|
|
4
|
+
icon: "Database"
|
|
5
|
+
source: "docs/spec/unified-theory.md"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
YugabyteDB Aeon exposes a Postgres-compatible query layer (**YSQL**). That is the only
|
|
9
|
+
API oke's `postgres` driver targets — not YCQL.
|
|
10
|
+
|
|
11
|
+
<Callout title="The one rule">
|
|
12
|
+
In **Connect → Connect to your Application**, choose **YSQL** and download the CA cert. Port
|
|
13
|
+
**5433** is the YSQL default — not Postgres's 5432.
|
|
14
|
+
</Callout>
|
|
15
|
+
|
|
16
|
+
## Find credentials (current console)
|
|
17
|
+
|
|
18
|
+
1. YugabyteDB Aeon → **Clusters** → select the cluster.
|
|
19
|
+
2. Click **Connect**.
|
|
20
|
+
3. Click **Connect to your Application**.
|
|
21
|
+
4. Click **Download CA Cert** and install it where the app can read it.
|
|
22
|
+
5. Select API **YSQL** (not YCQL).
|
|
23
|
+
6. Pick address mode: **Private Address** / **Private Service Endpoint** if VPC-peered;
|
|
24
|
+
**Public Address** only if **Settings → Network Access → Public Access** is enabled
|
|
25
|
+
(not recommended for production).
|
|
26
|
+
7. Copy **Connection String** (or Parameters) into `DATABASE_URL`.
|
|
27
|
+
|
|
28
|
+
```bash title="process env"
|
|
29
|
+
DATABASE_URL=postgresql://admin:…@….aws.yugabyte.cloud:5433/yugabyte?ssl=true&sslmode=verify-full&sslrootcert=/path/to/root.crt
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Also add your app's IPs (or peered VPC) to the cluster **IP allow list** before
|
|
33
|
+
connecting.
|
|
34
|
+
|
|
35
|
+
## Production guidance
|
|
36
|
+
|
|
37
|
+
| Topic | Guidance |
|
|
38
|
+
| ------- | ----------------------------------------------------------------------------- |
|
|
39
|
+
| API | **YSQL only** — YCQL is Cassandra-wire, useless to `postgres` |
|
|
40
|
+
| TLS | `sslmode=verify-full` + downloaded CA |
|
|
41
|
+
| Network | Prefer private / PSE; public access is an explicit opt-in |
|
|
42
|
+
| License | Core is **Apache 2.0** (including once-enterprise features in the core build) |
|
|
43
|
+
|
|
44
|
+
No Neon-style pooled hostname toggle — connection limits and load balancing are
|
|
45
|
+
cluster/VPC topology concerns. Smart drivers want a peered VPC; otherwise they probe
|
|
46
|
+
unreachable nodes first and add latency.
|
|
47
|
+
|
|
48
|
+
## Real gotcha — wrong API tab
|
|
49
|
+
|
|
50
|
+
Copying **YCQL** parameters (port **9042**) into `DATABASE_URL` fails immediately —
|
|
51
|
+
different protocol. Always confirm the Connect dialog shows **YSQL** and port **5433**.
|
|
52
|
+
|
|
53
|
+
## Troubleshooting
|
|
54
|
+
|
|
55
|
+
<Accordions>
|
|
56
|
+
<Accordion title="Connection timed out / could not connect to server">
|
|
57
|
+
|
|
58
|
+
IP allow list or Public Access. Add the client IP under network settings, or use the
|
|
59
|
+
private address from a peered VPC. Public hostname stays dark until Public Access is on.
|
|
60
|
+
|
|
61
|
+
</Accordion>
|
|
62
|
+
<Accordion title="SSL error with verify-full">
|
|
63
|
+
|
|
64
|
+
CA not downloaded or `sslrootcert` path wrong. Re-run **Download CA Cert** from the
|
|
65
|
+
Connect dialog and point the URI at that file.
|
|
66
|
+
|
|
67
|
+
</Accordion>
|
|
68
|
+
</Accordions>
|
|
69
|
+
|
|
70
|
+
## Learn more
|
|
71
|
+
|
|
72
|
+
- [CockroachDB](/docs/providers/cockroachdb) — license / feature comparison
|
|
73
|
+
- [YugabyteDB (self-hosted)](/docs/recipes/yugabytedb) — single-node Docker recipe
|
|
74
|
+
- [Postgres (image)](/docs/recipes/postgres) — driver this backs
|
|
75
|
+
- [Store · SQL](/docs/elements/store#sql) — schema workflows
|
|
76
|
+
|
|
77
|
+
## Next
|
|
78
|
+
|
|
79
|
+
<Cards>
|
|
80
|
+
<Card
|
|
81
|
+
title="CockroachDB"
|
|
82
|
+
description="Compare licensing and features."
|
|
83
|
+
href="/docs/providers/cockroachdb"
|
|
84
|
+
/>
|
|
85
|
+
<Card
|
|
86
|
+
title="Supabase"
|
|
87
|
+
description="Managed single-node option."
|
|
88
|
+
href="/docs/providers/supabase"
|
|
89
|
+
/>
|
|
90
|
+
<Card
|
|
91
|
+
title="Redis Cloud"
|
|
92
|
+
description="Managed Redis-side pair."
|
|
93
|
+
href="/docs/providers/redis-cloud"
|
|
94
|
+
/>
|
|
95
|
+
</Cards>
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Caddy"
|
|
3
|
+
description: "Automatic-HTTPS reverse proxy — OKE_PROXY_HOST, Caddyfile, /data certificate volume, single-instance compose."
|
|
4
|
+
icon: "Lock"
|
|
5
|
+
source: "docs/spec/unified-theory.md"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Caddy is the simplest TLS path — automatic HTTPS from a generated `Caddyfile`, no
|
|
9
|
+
certificate management by hand. Right choice for a single app instance without `--scale`.
|
|
10
|
+
|
|
11
|
+
<Callout title="The one rule">
|
|
12
|
+
Leave `images.proxy` unset until you need HTTPS at the edge or `--scale app=N`. Once set, `app`
|
|
13
|
+
stops publishing its host port directly — Caddy (or Traefik) does.
|
|
14
|
+
</Callout>
|
|
15
|
+
|
|
16
|
+
## Quick start
|
|
17
|
+
|
|
18
|
+
<Steps>
|
|
19
|
+
|
|
20
|
+
<Step>
|
|
21
|
+
### Pin the proxy
|
|
22
|
+
|
|
23
|
+
```typescript title="oke.config.ts"
|
|
24
|
+
images: {
|
|
25
|
+
proxy: "caddy:2-alpine",
|
|
26
|
+
},
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
</Step>
|
|
30
|
+
|
|
31
|
+
<Step>
|
|
32
|
+
### Set the public hostname
|
|
33
|
+
|
|
34
|
+
```bash title="docker/.env.docker"
|
|
35
|
+
OKE_PROXY_HOST=app.example.com
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Unset defaults to `localhost` — Caddy issues a **local** TLS cert instead of Let's Encrypt.
|
|
39
|
+
|
|
40
|
+
</Step>
|
|
41
|
+
|
|
42
|
+
<Step>
|
|
43
|
+
### Include the proxy layer
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
docker compose -f compose.yml -f compose.proxy.yml … up -d
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Generated `Caddyfile`: `{$OKE_PROXY_HOST:localhost} { reverse_proxy app:6530 }`.
|
|
50
|
+
|
|
51
|
+
</Step>
|
|
52
|
+
|
|
53
|
+
</Steps>
|
|
54
|
+
|
|
55
|
+
## Required env
|
|
56
|
+
|
|
57
|
+
| Variable | Required? | Meaning |
|
|
58
|
+
| ----------------------- | ----------- | --------------------------------------------------------------------------- |
|
|
59
|
+
| `OKE_PROXY_HOST` | Recommended | Public hostname for ACME; default `localhost` → local TLS only |
|
|
60
|
+
| `allowedHosts` (config) | Production | Must include the public hostname — see [Security](/docs/reference/security) |
|
|
61
|
+
|
|
62
|
+
Caddy has no separate ACME email env in this recipe (unlike Traefik's
|
|
63
|
+
`OKE_PROXY_ACME_EMAIL`).
|
|
64
|
+
|
|
65
|
+
## Data and backup
|
|
66
|
+
|
|
67
|
+
| Volume | Path | What it stores |
|
|
68
|
+
| -------------- | ----------------------------------------- | ------------------------------- |
|
|
69
|
+
| `proxy-data` | `/data` | ACME certificates, account keys |
|
|
70
|
+
| `proxy-config` | `/config` | Caddy runtime config |
|
|
71
|
+
| Bind mount | `./Caddyfile` → `/etc/caddy/Caddyfile:ro` | Generated site block |
|
|
72
|
+
|
|
73
|
+
**Backup means:** preserve the `proxy-data` named volume (and ideally `proxy-config`) so
|
|
74
|
+
Let's Encrypt rate limits and cert renewals survive recreates. Losing `/data` forces
|
|
75
|
+
re-issuance. The `Caddyfile` is regenerated by `oke docker`.
|
|
76
|
+
|
|
77
|
+
## Production note
|
|
78
|
+
|
|
79
|
+
Caddy has **no** service-discovery story for multiple `app` replicas. Once you run
|
|
80
|
+
`docker compose up --scale app=N`, switch to [Traefik](/docs/recipes/traefik) — it
|
|
81
|
+
discovers replicas from Docker labels instead of a static `reverse_proxy` target.
|
|
82
|
+
|
|
83
|
+
Also set `allowedHosts` to your public hostname before exposing the edge — see
|
|
84
|
+
[Reverse proxy](/docs/deployment/reverse-proxy).
|
|
85
|
+
|
|
86
|
+
## What the recipe configures
|
|
87
|
+
|
|
88
|
+
| Field | Value |
|
|
89
|
+
| -------------- | -------------------------------------------- |
|
|
90
|
+
| Ports | `80` + `443` published; `app` stays internal |
|
|
91
|
+
| Healthcheck | `caddy version`, every 10s, 5 retries |
|
|
92
|
+
| Connection URL | `https://<host>` |
|
|
93
|
+
|
|
94
|
+
## Troubleshooting
|
|
95
|
+
|
|
96
|
+
<Accordions>
|
|
97
|
+
<Accordion title="ACME fails — connection refused / challenge timeout">
|
|
98
|
+
|
|
99
|
+
`OKE_PROXY_HOST` must be a DNS name that resolves to this host on ports 80/443. Localhost
|
|
100
|
+
never gets a public Let's Encrypt cert — that path uses Caddy's local CA. Check firewall
|
|
101
|
+
and that nothing else binds `:80`.
|
|
102
|
+
|
|
103
|
+
</Accordion>
|
|
104
|
+
<Accordion title="Browser trust errors on localhost">
|
|
105
|
+
|
|
106
|
+
Expected with the local CA. Install Caddy's local root for that machine, or set a real
|
|
107
|
+
`OKE_PROXY_HOST` with public DNS when you need a public cert.
|
|
108
|
+
|
|
109
|
+
</Accordion>
|
|
110
|
+
</Accordions>
|
|
111
|
+
|
|
112
|
+
## Learn more
|
|
113
|
+
|
|
114
|
+
- [Reverse proxy](/docs/deployment/reverse-proxy) — Caddy vs Traefik rationale
|
|
115
|
+
- [Docker · Reverse proxy](/docs/deployment/docker#reverse-proxy) — compose layer order
|
|
116
|
+
- [Security](/docs/reference/security) — `allowedHosts`
|
|
117
|
+
|
|
118
|
+
## Next
|
|
119
|
+
|
|
120
|
+
<Cards>
|
|
121
|
+
<Card title="Traefik" description="Multi-replica alternative." href="/docs/recipes/traefik" />
|
|
122
|
+
<Card
|
|
123
|
+
title="PgDog"
|
|
124
|
+
description="Pool Postgres behind the same stack."
|
|
125
|
+
href="/docs/recipes/pgdog"
|
|
126
|
+
/>
|
|
127
|
+
<Card title="Redis" description="The default store.kv image." href="/docs/recipes/redis" />
|
|
128
|
+
</Cards>
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "CockroachDB"
|
|
3
|
+
description: "Self-hosted single-node Cockroach — COCKROACH_* env, port 26257, DB Console on :8080, driver stays postgres."
|
|
4
|
+
icon: "Database"
|
|
5
|
+
source: "docs/spec/unified-theory.md"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
CockroachDB speaks Postgres wire closely enough that `drivers.store.sql` stays
|
|
9
|
+
`postgres`. Pin `cockroachdb/cockroach` as `store.sql` and `oke docker` derives a
|
|
10
|
+
single-node compose service — credentials, healthcheck, and `DATABASE_URL`.
|
|
11
|
+
|
|
12
|
+
<Callout title="The one rule">
|
|
13
|
+
The driver id stays `postgres` — vendor choice lives in `images["store.sql"]`, not in
|
|
14
|
+
`drivers.store.sql`. Host maps `:5432` → container `:26257` so local apps keep the usual Postgres
|
|
15
|
+
port.
|
|
16
|
+
</Callout>
|
|
17
|
+
|
|
18
|
+
## Quick start
|
|
19
|
+
|
|
20
|
+
<Steps>
|
|
21
|
+
|
|
22
|
+
<Step>
|
|
23
|
+
### Pin the image
|
|
24
|
+
|
|
25
|
+
```typescript title="oke.config.ts"
|
|
26
|
+
images: {
|
|
27
|
+
"store.sql": "cockroachdb/cockroach:v25.2.0", // pin a real tag
|
|
28
|
+
},
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
</Step>
|
|
32
|
+
|
|
33
|
+
<Step>
|
|
34
|
+
### Bring the stack up
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
oke dev --docker
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
`oke docker` injects `COCKROACH_USER` / `COCKROACH_PASSWORD` / `COCKROACH_DATABASE`
|
|
41
|
+
from `OKE_STORE_SQL_*`, starts `start-single-node --accept-sql-without-tls`, and
|
|
42
|
+
publishes SQL on host `:5432` plus the DB Console on `:8080`.
|
|
43
|
+
|
|
44
|
+
</Step>
|
|
45
|
+
|
|
46
|
+
<Step>
|
|
47
|
+
### Connect
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
echo "$DATABASE_URL"
|
|
51
|
+
# postgres://oke:…@127.0.0.1:5432/oke?sslmode=require
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
</Step>
|
|
55
|
+
|
|
56
|
+
</Steps>
|
|
57
|
+
|
|
58
|
+
## Required env
|
|
59
|
+
|
|
60
|
+
| Variable | Who sets it | Meaning |
|
|
61
|
+
| ------------------------ | ---------------------- | ------------------------------------ |
|
|
62
|
+
| `OKE_STORE_SQL_USER` | `oke docker` → compose | → `COCKROACH_USER` (first boot only) |
|
|
63
|
+
| `OKE_STORE_SQL_PASSWORD` | `oke docker` → compose | → `COCKROACH_PASSWORD` |
|
|
64
|
+
| `OKE_STORE_SQL_DB` | `oke docker` → compose | → `COCKROACH_DATABASE` |
|
|
65
|
+
| `DATABASE_URL` | stack env for the app | Includes `sslmode=require` |
|
|
66
|
+
|
|
67
|
+
## Data and backup
|
|
68
|
+
|
|
69
|
+
| Path | What lives there |
|
|
70
|
+
| --------------------------- | --------------------------------------------- |
|
|
71
|
+
| `/cockroach/cockroach-data` | Named volume `store-sql-data` — cluster store |
|
|
72
|
+
|
|
73
|
+
**Backup means:** volume backup of `store-sql-data`, or Cockroach's backup tooling
|
|
74
|
+
against a running node. Losing that volume loses the cluster.
|
|
75
|
+
|
|
76
|
+
## Production note
|
|
77
|
+
|
|
78
|
+
This recipe is a **single-node** cluster — fine for local and small self-hosted apps,
|
|
79
|
+
not multi-region HA. For managed multi-region, use the
|
|
80
|
+
[CockroachDB provider](/docs/providers/cockroachdb). Prefer a pinned tag, not `latest`.
|
|
81
|
+
|
|
82
|
+
## What the recipe configures
|
|
83
|
+
|
|
84
|
+
| Field | Value |
|
|
85
|
+
| -------------- | -------------------------------------------- |
|
|
86
|
+
| Container port | `26257` (host publishes `5432`) |
|
|
87
|
+
| Extra port | `8080` — DB Console |
|
|
88
|
+
| Command | `start-single-node --accept-sql-without-tls` |
|
|
89
|
+
| Healthcheck | `GET /health?ready=1` on `:8080` |
|
|
90
|
+
| Connection URL | `postgres://…?sslmode=require` |
|
|
91
|
+
|
|
92
|
+
## Troubleshooting
|
|
93
|
+
|
|
94
|
+
<Accordions>
|
|
95
|
+
<Accordion title="oke boot: postgres driver needs DATABASE_URL">
|
|
96
|
+
|
|
97
|
+
Re-run `oke dev --docker` so the stack writes `docker/.env.docker`, or export
|
|
98
|
+
`DATABASE_URL` yourself when pointing at a remote Cockroach host.
|
|
99
|
+
|
|
100
|
+
</Accordion>
|
|
101
|
+
<Accordion title="store-sql unhealthy / healthcheck never ready">
|
|
102
|
+
|
|
103
|
+
First boot can take longer than Postgres. Check
|
|
104
|
+
`docker compose … logs store-sql` for SQL ready. Empty `${OKE_STORE_SQL_PASSWORD}`
|
|
105
|
+
in `.env.docker` leaves the init user broken — regenerate the stack env.
|
|
106
|
+
|
|
107
|
+
</Accordion>
|
|
108
|
+
</Accordions>
|
|
109
|
+
|
|
110
|
+
## Learn more
|
|
111
|
+
|
|
112
|
+
- [CockroachDB (provider)](/docs/providers/cockroachdb) — managed Cloud Connect flow
|
|
113
|
+
- [YugabyteDB](/docs/recipes/yugabytedb) — Apache-2.0 self-hosted alternative
|
|
114
|
+
- [Postgres](/docs/recipes/postgres) — default SQL recipe
|
|
115
|
+
- [Store · SQL](/docs/elements/store#sql) — schema push / generate / migrate
|
|
116
|
+
|
|
117
|
+
## Next
|
|
118
|
+
|
|
119
|
+
<Cards>
|
|
120
|
+
<Card
|
|
121
|
+
title="CockroachDB Cloud"
|
|
122
|
+
description="Managed multi-region alternative."
|
|
123
|
+
href="/docs/providers/cockroachdb"
|
|
124
|
+
/>
|
|
125
|
+
<Card title="YugabyteDB" description="Self-hosted YSQL peer." href="/docs/recipes/yugabytedb" />
|
|
126
|
+
<Card title="Postgres" description="The default store.sql image." href="/docs/recipes/postgres" />
|
|
127
|
+
</Cards>
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Dragonfly"
|
|
3
|
+
description: "Multi-threaded Redis-wire runtime — OKE_STORE_KV_PASSWORD, memlock ulimit, no maxmemory-policy flag."
|
|
4
|
+
icon: "Zap"
|
|
5
|
+
source: "docs/spec/unified-theory.md"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Dragonfly is a multi-threaded, memory-efficient reimplementation of the Redis protocol —
|
|
9
|
+
same `redis://` wire format, different engine. Slots behind the same `redis` driver with
|
|
10
|
+
zero Flow changes.
|
|
11
|
+
|
|
12
|
+
<Callout title="The one rule">
|
|
13
|
+
Driver id stays `redis`. Dragonfly is an image choice — every KV call through `fx.store` behaves
|
|
14
|
+
identically to Redis or Valkey at the protocol layer.
|
|
15
|
+
</Callout>
|
|
16
|
+
|
|
17
|
+
## Quick start
|
|
18
|
+
|
|
19
|
+
<Steps>
|
|
20
|
+
|
|
21
|
+
<Step>
|
|
22
|
+
### Pin the image
|
|
23
|
+
|
|
24
|
+
```typescript title="oke.config.ts"
|
|
25
|
+
images: {
|
|
26
|
+
"store.kv": "docker.dragonflydb.io/dragonflydb/dragonfly",
|
|
27
|
+
},
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
</Step>
|
|
31
|
+
|
|
32
|
+
<Step>
|
|
33
|
+
### Password + memory
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
OKE_STORE_KV_PASSWORD=…
|
|
37
|
+
OKE_STORE_KV_MAXMEMORY=256mb # optional; recipe passes --maxmemory
|
|
38
|
+
REDIS_URL=redis://:…@127.0.0.1:6379
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Command: `dragonfly --requirepass "$OKE_STORE_KV_PASSWORD" --maxmemory "…"`.
|
|
42
|
+
|
|
43
|
+
Unlike Redis/Valkey, this recipe does **not** pass `--maxmemory-policy` — Dragonfly's
|
|
44
|
+
own defaults apply.
|
|
45
|
+
|
|
46
|
+
</Step>
|
|
47
|
+
|
|
48
|
+
<Step>
|
|
49
|
+
### memlock ulimit
|
|
50
|
+
|
|
51
|
+
The recipe sets `ulimits.memlock: -1` — required for Dragonfly's shared-nothing design.
|
|
52
|
+
If the host forbids unlimited memlock, the container may fail to start.
|
|
53
|
+
|
|
54
|
+
</Step>
|
|
55
|
+
|
|
56
|
+
</Steps>
|
|
57
|
+
|
|
58
|
+
## Required env
|
|
59
|
+
|
|
60
|
+
| Variable | Required? | Meaning |
|
|
61
|
+
| ------------------------ | ------------- | --------------------------------------------------- |
|
|
62
|
+
| `OKE_STORE_KV_PASSWORD` | **Yes** | `--requirepass` |
|
|
63
|
+
| `REDIS_URL` | **Yes** (app) | `redis://` URL for the driver |
|
|
64
|
+
| `OKE_STORE_KV_MAXMEMORY` | Optional | `--maxmemory` (default `0` in the command template) |
|
|
65
|
+
| `HEALTHCHECK_PORT` | Set by recipe | `6379` — used by the image's healthcheck script |
|
|
66
|
+
|
|
67
|
+
## Data and backup
|
|
68
|
+
|
|
69
|
+
No named volume — ephemeral by default, same as Redis/Valkey. **Backup means:** do not
|
|
70
|
+
treat this container as durable storage until you add a volume and Dragonfly persistence
|
|
71
|
+
settings; rebuild from SQL/files, or use [Dragonfly Cloud](/docs/providers/dragonfly-cloud).
|
|
72
|
+
|
|
73
|
+
## Production note
|
|
74
|
+
|
|
75
|
+
BSL 1.1 — converts to Apache 2.0 on a published change date per release. Free for
|
|
76
|
+
self-hosting; the BSL terms restrict offering Dragonfly itself as a commercial managed
|
|
77
|
+
service to third parties — running it for your own app is unaffected.
|
|
78
|
+
|
|
79
|
+
Multi-threaded architecture makes better use of multi-core hosts than single-threaded
|
|
80
|
+
Redis under heavy concurrent load. For a managed endpoint with TLS + passkey, see
|
|
81
|
+
[Dragonfly Cloud](/docs/providers/dragonfly-cloud).
|
|
82
|
+
|
|
83
|
+
## What the recipe configures
|
|
84
|
+
|
|
85
|
+
| Field | Value |
|
|
86
|
+
| -------------- | ----------------------------------------------------- |
|
|
87
|
+
| Container port | `6379` |
|
|
88
|
+
| `ulimits` | `memlock: -1` |
|
|
89
|
+
| Healthcheck | `/usr/local/bin/healthcheck.sh`, every 5s, 10 retries |
|
|
90
|
+
| Connection URL | `redis://:pass@host:6379` |
|
|
91
|
+
|
|
92
|
+
## Troubleshooting
|
|
93
|
+
|
|
94
|
+
<Accordions>
|
|
95
|
+
<Accordion title="Container exits — cannot lock memory / memlock">
|
|
96
|
+
|
|
97
|
+
Host `ulimit -l` is too low. The recipe requests unlimited memlock. Raise the Docker
|
|
98
|
+
daemon / systemd limit, or run on a host that allows `memlock: -1`.
|
|
99
|
+
|
|
100
|
+
</Accordion>
|
|
101
|
+
<Accordion title="oke boot: redis driver needs REDIS_URL">
|
|
102
|
+
|
|
103
|
+
Same driver failure as Redis — export `REDIS_URL` or let docker mode write it. Wrong
|
|
104
|
+
password yields Redis-protocol `NOAUTH` / `WRONGPASS` from the server.
|
|
105
|
+
|
|
106
|
+
</Accordion>
|
|
107
|
+
</Accordions>
|
|
108
|
+
|
|
109
|
+
## Learn more
|
|
110
|
+
|
|
111
|
+
- [Store · KV](/docs/elements/store#kv) — full Redis-protocol image license table
|
|
112
|
+
- [Dragonfly Cloud](/docs/providers/dragonfly-cloud) — the managed equivalent
|
|
113
|
+
- [Redis](/docs/recipes/redis) · [Valkey](/docs/recipes/valkey) — the other two peers
|
|
114
|
+
|
|
115
|
+
## Next
|
|
116
|
+
|
|
117
|
+
<Cards>
|
|
118
|
+
<Card
|
|
119
|
+
title="Dragonfly Cloud"
|
|
120
|
+
description="Managed Dragonfly."
|
|
121
|
+
href="/docs/providers/dragonfly-cloud"
|
|
122
|
+
/>
|
|
123
|
+
<Card title="Valkey" description="Permissive-licensed peer." href="/docs/recipes/valkey" />
|
|
124
|
+
<Card title="PgDog" description="Pooling for the SQL side." href="/docs/recipes/pgdog" />
|
|
125
|
+
</Cards>
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Recipes"
|
|
3
|
+
description: "Docker recipes already shipped in oke docker — SQL (including Cockroach, Yugabyte, Timescale), KV, proxy, and services."
|
|
4
|
+
icon: "Container"
|
|
5
|
+
source: "docs/spec/unified-theory.md"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Every recipe below is already wired into `oke docker` — pin an image in `oke.config.ts`
|
|
9
|
+
and get env, healthcheck, and a connection URL for free.
|
|
10
|
+
|
|
11
|
+
<Callout title="The one rule">
|
|
12
|
+
Vendor choice lives in `images[…]` — never in `drivers.*`, which only ever say protocol ids
|
|
13
|
+
(`postgres`, `redis`, `s3`, `smtp`, `openbao`, `meilisearch`, `openai-compatible`, `ollama`, …).
|
|
14
|
+
</Callout>
|
|
15
|
+
|
|
16
|
+
## SQL
|
|
17
|
+
|
|
18
|
+
<Cards>
|
|
19
|
+
<Card
|
|
20
|
+
title="Postgres"
|
|
21
|
+
description="Default store.sql — POSTGRES_*, PGDATA, DATABASE_URL."
|
|
22
|
+
href="/docs/recipes/postgres"
|
|
23
|
+
/>
|
|
24
|
+
<Card
|
|
25
|
+
title="Supabase"
|
|
26
|
+
description="supabase/postgres extension bundle only."
|
|
27
|
+
href="/docs/recipes/supabase-docker"
|
|
28
|
+
/>
|
|
29
|
+
<Card
|
|
30
|
+
title="CockroachDB"
|
|
31
|
+
description="Self-hosted single-node — port 26257, COCKROACH_*."
|
|
32
|
+
href="/docs/recipes/cockroachdb"
|
|
33
|
+
/>
|
|
34
|
+
<Card
|
|
35
|
+
title="YugabyteDB"
|
|
36
|
+
description="Self-hosted YSQL — port 5433, YSQL_*."
|
|
37
|
+
href="/docs/recipes/yugabytedb"
|
|
38
|
+
/>
|
|
39
|
+
<Card
|
|
40
|
+
title="Timescale"
|
|
41
|
+
description="Postgres + hypertables — same POSTGRES_* contract."
|
|
42
|
+
href="/docs/recipes/timescale"
|
|
43
|
+
/>
|
|
44
|
+
</Cards>
|
|
45
|
+
|
|
46
|
+
## KV
|
|
47
|
+
|
|
48
|
+
Driver id stays `redis` for every image below.
|
|
49
|
+
|
|
50
|
+
<Cards>
|
|
51
|
+
<Card
|
|
52
|
+
title="Redis"
|
|
53
|
+
description="Default store.kv — requirepass + maxmemory."
|
|
54
|
+
href="/docs/recipes/redis"
|
|
55
|
+
/>
|
|
56
|
+
<Card title="Valkey" description="BSD-licensed Redis-wire fork." href="/docs/recipes/valkey" />
|
|
57
|
+
<Card
|
|
58
|
+
title="Dragonfly"
|
|
59
|
+
description="Multi-threaded Redis-wire runtime."
|
|
60
|
+
href="/docs/recipes/dragonfly"
|
|
61
|
+
/>
|
|
62
|
+
</Cards>
|
|
63
|
+
|
|
64
|
+
## Proxy
|
|
65
|
+
|
|
66
|
+
Opt-in via `images.proxy` — leave unset until you need HTTPS or `--scale app=N`.
|
|
67
|
+
|
|
68
|
+
<Cards>
|
|
69
|
+
<Card title="Caddy" description="Automatic-HTTPS, single instance." href="/docs/recipes/caddy" />
|
|
70
|
+
<Card
|
|
71
|
+
title="Traefik"
|
|
72
|
+
description="Docker-label discovery + socket-proxy."
|
|
73
|
+
href="/docs/recipes/traefik"
|
|
74
|
+
/>
|
|
75
|
+
</Cards>
|
|
76
|
+
|
|
77
|
+
## Services
|
|
78
|
+
|
|
79
|
+
<Cards>
|
|
80
|
+
<Card title="PgDog" description="Transaction pooler on :6432." href="/docs/recipes/pgdog" />
|
|
81
|
+
<Card
|
|
82
|
+
title="RustFS"
|
|
83
|
+
description="S3-compatible store.files — /data volume."
|
|
84
|
+
href="/docs/recipes/rustfs"
|
|
85
|
+
/>
|
|
86
|
+
<Card title="Mailpit" description="SMTP catcher — UI on :8025." href="/docs/recipes/mailpit" />
|
|
87
|
+
<Card title="OpenBao" description="Raft vault — unseal key SPOF." href="/docs/recipes/openbao" />
|
|
88
|
+
<Card
|
|
89
|
+
title="Meilisearch"
|
|
90
|
+
description="Full-text store.index on :7700."
|
|
91
|
+
href="/docs/recipes/meilisearch"
|
|
92
|
+
/>
|
|
93
|
+
</Cards>
|
|
94
|
+
|
|
95
|
+
## AI (local / self-hosted)
|
|
96
|
+
|
|
97
|
+
Default local pin is **llama.cpp**. Ollama stays fully supported. vLLM / SGLang
|
|
98
|
+
are production-tier self-host options — most apps still use a managed provider.
|
|
99
|
+
|
|
100
|
+
| Workload | Recipe |
|
|
101
|
+
| -------------------------------- | ---------------------------------------------- |
|
|
102
|
+
| Single-user / dev (lightest) | [llama.cpp](/docs/recipes/llama-cpp) (default) |
|
|
103
|
+
| Local library UX | [Ollama](/docs/recipes/ollama) |
|
|
104
|
+
| Multi-user GPU concurrency | [vLLM](/docs/recipes/vllm) |
|
|
105
|
+
| Structured / agent GPU workloads | [SGLang](/docs/recipes/sglang) |
|
|
106
|
+
| Managed cloud | Anthropic / OpenAI / … (no `images.ai`) |
|
|
107
|
+
|
|
108
|
+
All four recipes **loopback-publish only** and pin explicit tags (never
|
|
109
|
+
`latest`). Load models from curated registries — never arbitrary untrusted GGUF.
|
|
110
|
+
|
|
111
|
+
<Cards>
|
|
112
|
+
<Card
|
|
113
|
+
title="llama.cpp"
|
|
114
|
+
description="Default local AI — OpenAI /v1, lightest footprint."
|
|
115
|
+
href="/docs/recipes/llama-cpp"
|
|
116
|
+
/>
|
|
117
|
+
<Card
|
|
118
|
+
title="Ollama"
|
|
119
|
+
description="Fully supported alternative — library pull UX."
|
|
120
|
+
href="/docs/recipes/ollama"
|
|
121
|
+
/>
|
|
122
|
+
<Card title="vLLM" description="Self-hosted multi-user GPU serving." href="/docs/recipes/vllm" />
|
|
123
|
+
<Card
|
|
124
|
+
title="SGLang"
|
|
125
|
+
description="Self-hosted structured / agent GPU serving."
|
|
126
|
+
href="/docs/recipes/sglang"
|
|
127
|
+
/>
|
|
128
|
+
</Cards>
|
|
129
|
+
|
|
130
|
+
## Learn more
|
|
131
|
+
|
|
132
|
+
- [Providers](/docs/providers) — managed cloud alternatives
|
|
133
|
+
- [Docker](/docs/deployment/docker) — compose derivation, PgDog, reverse proxy
|
|
134
|
+
- [Store](/docs/elements/store) — `sql` / `kv` / `files` / `index` facets
|
|
135
|
+
|
|
136
|
+
## Next
|
|
137
|
+
|
|
138
|
+
<Cards>
|
|
139
|
+
<Card
|
|
140
|
+
title="Postgres"
|
|
141
|
+
description="Start with the default SQL recipe."
|
|
142
|
+
href="/docs/recipes/postgres"
|
|
143
|
+
/>
|
|
144
|
+
<Card title="Providers" description="Managed cloud alternatives." href="/docs/providers" />
|
|
145
|
+
<Card title="Deployment" description="Compose, Swarm, or Kubernetes." href="/docs/deployment" />
|
|
146
|
+
</Cards>
|