Skip to content
ShopNexus Docs
On this page No defaults 1/4

No defaults

No setting has a default, in the Go code, the Compose files, the Makefile or the test helpers. Every variable must be set. At start the server checks them all and exits with one line per variable that is missing, empty or invalid.

Some variables mean something when empty: no OTLP export, no previous JWT key, no trusted proxies, pushes written to the log. They are still set, to the empty string, in .env.example and in every environment.

Setting up

server/.env.example lists every variable with development values. The first make run copies it to .env and then appends the generated keys: the JWT signing key, the console key and Restate’s identity key. The server reads .env at start, and a variable already set in the process environment wins over the file.

Two values are left for you: LLM_API_KEY and LLM_MODEL. If you add a variable to the code, add it to .env.example in the same change.

Tests read their own file, .env.test, which points at the test stack. Its variables have a TEST_ prefix.

The groups

GroupWhat it sets
RuntimeAPP_ENV (dev, test or prod), the HTTP address, log level and format, trusted proxy ranges
Databasethe Postgres connection URL
Restateingress and admin URLs, where the server serves its endpoint, a service name prefix, the identity key
TokensJWT issuer, audience, signing key and an optional previous key during a key change
Consolethe console key and the one origin CORS allows for the console
Object storethe RustFS endpoint, the public endpoint phones reach, credentials, bucket and the base URL for media
Firebasethe project, the key URLs for phone tokens, whether PNV test numbers pass, push credentials
Search modelbase URL, key and model name of an OpenAI-compatible API
Telemetrythe OTLP endpoint and the service name

Production

APP_ENV=prod adds rules: the Restate identity key must be set, PNV test numbers must be off, and push credentials must be present.

ShopNexus Docs
EN VI

Suggested for this page

Quick actions