# Voltro local env — helm baseline. # # Helm is your DEPLOY target, not your dev loop. This .env governs # local dev (run via `pnpm dev` against a local Postgres). # # In-cluster env values come from the Helm chart's ConfigMap + # Secret, NOT from this file. See charts/voltro-app/templates/. # ── Environment ──────────────────────────────────────────────────────── # # DECLARE IT. Every `voltro db …` / `voltro migrate` invocation resolves an # UNSET `NODE_ENV` to `production` — the same way `voltro serve` and `voltro # start` do — so a bare `pnpm migrate` with no NODE_ENV refuses rather than # applying an un-reviewed diff to what might be a production database. It also # decides which `_voltro_*` bookkeeping tables the command declares, and a # migration command that resolves it differently from the serving process # declares a DIFFERENT schema. # # `voltro dev` declares `development` for itself and needs nothing from here; # this line is what makes the explicit schema commands work locally. NODE_ENV=development # Local Postgres (your install — or a docker run sidecar — or any # managed instance you can reach from your laptop). DB_URL=postgres://app:app@localhost:5432/{{projectName}} # Session signing secret — NO VALUE SHIPS HERE ON PURPOSE. # # `voltro dev` mints a unique one for this project into a gitignored # .env.local on first boot, so local development needs nothing from you. # A shipped placeholder would be a signing key published to everyone who # downloads this template, making every session in your deployment forgeable. # # Your DEPLOYMENT needs its own — `voltro serve` refuses to start without it: # voltro secret generate session VOLTRO_SESSION_SECRET= # ─── Optional backends — ALL OFF by default; uncomment to activate ─────────── # The cache and the durable KV each run on a zero-infra default (in-process # memory / your SQL store). Point either at a RESP server (Redis / Valkey / # KeyDB / Dragonfly / Upstash) ONLY when you want cross-instance sharing. # In-cluster these come from the chart's ConfigMap/Secret; this file governs # local dev. Enablement is per concern — a bare REDIS_URL is NOT a master # switch; each reads its own _REDIS_URL first, then a shared REDIS_URL. # @voltro/cache → Redis: a distributed query/result cache. `voltro add redis` # wires this for you (flips app.config `cache: 'redis'` + adds the infra). # CACHE_BACKEND=redis # CACHE_REDIS_URL=redis://localhost:6379 # @voltro/kv → Redis: durable `ctx.kv`. Default backend is `database` # (durable, shared across replicas, survives restarts) — leave it unless you # specifically want KV on Redis. If you do, use a PERSISTENT redis (AOF/RDB), # NOT an ephemeral cache-only one: an eviction/restart is data loss for # durable KV. See docs → Caching → Key-value backends. # KV_BACKEND=redis # KV_REDIS_URL=redis://localhost:6379 # One server for everything, instead of the per-concern URLs above: # REDIS_URL=redis://localhost:6379