Local environment (Compose)
deploy/local/compose.yaml runs the DEV backing services as containers so a workstation can serve
the apps, run db:reset, dev:refresh and the Playwright suite without touching the deployed
tier (Dev environment (Railway)).
| Railway DEV | Local |
|---|---|
postgis/postgis:16-3.5, db kotddb | same image and db, postgres/postgres |
valkey/valkey:8, requirepass + appendonly | same flags, password localvalkey |
getmeili/meilisearch:v1.9.0, production mode | same; per-workspace master key |
Cloudflare R2 uploads-dev | SeaweedFS (S3 API) bucket uploads |
imgproxy:v3.30.1 reading R2 | same image reading SeaweedFS |
app images behind *.dev.useast.kottia.com | PR 2 (railway profile): Caddy + the real Dockerfiles |
Lifecycle
Section titled “Lifecycle”- One stack per Orca workspace.
bun run local initwrites the gitignoreddeploy/local/.env: Compose project name, a port base hashed from the worktree path, generated secrets. Workspaces run side by side on different ports. - Started on demand only —
bun run local up. Never on workspace creation,bun run dev, push or boot. Containers userestart: "no": after a reboot they show asExitedandupbrings them back with their data. - Removed with the workspace — the Orca archive hook runs
deploy/local/hooks/archive.sh, which purges containers, network, volumes and per-project images.orca worktree rmskips archive hooks unless--run-hooks;bun run local gc --executecleans up after that.
Commands
Section titled “Commands”bun run local doctor [--strict] # validate tooling, .env, ports, stack, Doppler key names, wiringbun run local up # services + bucket + migrationsbun run local dev # up + turbo devbun run local exec -- <cmd> # workspace env over Doppler dev_dockerbun run local status | down | down --purge | gc [--execute]doctor is read-only: one ok / warn / fail / skip line per check (identity file, tooling,
ports, stack health, each service, Doppler key names, exported wiring, Orca hook wiring),
exit 1 on any fail, --strict to fail on warn. up runs the tooling and identity checks first.
e2e. Playwright’s webServer allows 60 s and the build takes longer, so build and start the
preview through the wrapper (bun run local exec --cwd apps/svelte-web -- env BETTER_AUTH_URL=http://localhost:4173 ORIGIN=http://localhost:4173 bun run preview),
then run bun run local exec --cwd apps/svelte-web -- bunx playwright test; the config reuses the
listening server. Full recipe in the runbook.
exec exports the loopback wiring and the generated secrets, then runs the command under
doppler run -c dev_docker --preserve-env=…, so Doppler contributes only third-party keys. It
refuses a non-loopback database host, and db-reset.ts carries the same guard — dev_local
points at the deployed DEV database through a TCP proxy.
Keys and data
Section titled “Keys and data”- On by default: Resend (email OTP sign-in) and Google (OAuth client + Maps). Opt in to
stripe,facturapi,knock,getstream,posthog,aiviaLOCAL_VENDORSindeploy/local/.env. Sentry and Cloudflare are never on. Sign in with email OTP. - Search seeds:
doppler run -p kottia-com -c dev -- bun run scripts/local-search-seeds.tscopiessearch-seeds/*.ndjson.gzfrom R2 into the local bucket; restart the worker. The database starts empty and migrated — DEV data is never restored (fiscal PII is encrypted with the Railway key).
See Env vars for the key reference and the runbook for the expected
dev_docker values, the Orca hook snippets and troubleshooting.