Skip to content

Environment variables

Every environment variable the code reads, generated from .env.example (copy it to .env to get started), the schemas of app/config.server.ts and app/config.ts, which fail the start with a list of what is wrong, and the code reading process.env or import.meta.env directly.

Server

Read on the server only, validated by the schema of app/config.server.ts and read through ServerConfig (a few are read straight from process.env).

NODE_ENV

not in .env.exampleconfig.server.ts

when we do pnpm run setup NODE_ENV is not set -> use test seasons

Client

VITE_* variables, built into the client bundle by Vite so never secrets. Validated by the schema of app/config.ts and read through Config.

Scripts & build config

Listed in .env.example but read only outside the app: by scripts of scripts/ and the root config files.

RENDER_API_KEY

.env.example

Admin only: used by pnpm run deploy:prod. API key from Render Dashboard -> Account Settings -> API Keys, service id from the service's URL in the dashboard e.g. srv-xxxxxxxx

RENDER_SERVICE_ID

.env.example

Admin only: used by pnpm run deploy:prod. API key from Render Dashboard -> Account Settings -> API Keys, service id from the service's URL in the dashboard e.g. srv-xxxxxxxx

Tooling

Not in .env.example nor the config schemas: set by CI, package scripts or by hand to tweak a tool.