# --- Required --- # Bearer token CI uses to upload builds. Generate with `openssl rand -hex 32`. UPLOAD_TOKEN=replace-me # --- Optional --- # Fastify listen port. Northflank sets this automatically; leave unset there. PORT=8080 # Persistent storage root. In Docker this is the mounted volume. DATA_DIR=./data # If both are set, the dashboard (and read-only API) require HTTP basic auth. # Leave unset for a public dashboard. # DASHBOARD_USERNAME=admin # DASHBOARD_PASSWORD=replace-me # Max bytes per uploaded bundle. Default 100 MB — bundles ship without # node_modules now, so this is plenty. Raise if you're shipping fat SSR # bundles with the .next/ build output. # MAX_UPLOAD_BYTES=104857600 # Wall-clock ceiling for the optional per-cell installCmd (e.g. # `pnpm install --frozen-lockfile`). # INSTALL_TIMEOUT_MS=300000 # Wall-clock ceiling for the whole `lhci collect` (all runs share it). Per # throttle method: simulate (Lantern) is fast; devtools (real Slow 4G) needs # a much larger budget since each run waits out the throttled load in real time. # CELL_TIMEOUT_MS=900000 # CELL_TIMEOUT_MS_DEVTOOLS=2100000 # Per-IP rate limit applied to every route, /healthz included. Defaults to # 100 requests per 60s window. # RATE_LIMIT_MAX=100 # RATE_LIMIT_WINDOW_MS=60000 # How many reverse-proxy hops in front of us append X-Forwarded-For. Counted # from the right, so 1 = "trust only what our own edge appended". Deliberately # a count and not `true`: trusting the whole chain lets a caller prepend an XFF # entry, become `req.ip`, and get a fresh rate-limit bucket per request. Set 0 # for local dev / no proxy. Only raise it if you genuinely add another hop — # too high re-opens the bypass, too low buckets every client together. # TRUST_PROXY_HOPS=1 # How long to keep build tarballs before the cleanup loop removes them. # Reports + metrics stay forever; only the raw bundles are cleaned. # BUNDLE_RETENTION_DAYS=7 # pino log level: trace | debug | info | warn | error | fatal LOG_LEVEL=info # Optional: override the Chrome binary Lighthouse uses. If unset we use # Playwright's bundled Chromium (`playwright install chromium`). # CHROME_PATH=/Applications/Google Chrome.app/Contents/MacOS/Google Chrome # Number of Lighthouse runs per cell (same for both throttle methods, so sample # sizes stay comparable). 15 tightens the distribution vs Google's recommended # 5 — matters most for the noisier real-browser runs. Lower for local smoke # tests (this is what `pnpm run fixture:upload` runs against). # LIGHTHOUSE_NUM_RUNS=15 # --- Sentry publisher --- # DSN of the Sentry project this lab publishes metrics into. If unset, the # publisher process still runs but emits a warning and ships nothing — useful # for local dev where you want the worker but not the network egress. # SENTRY_DSN=https://@.ingest.sentry.io/ # Sentry environment tag. Defaults to NODE_ENV. # SENTRY_ENVIRONMENT=production # How often the publisher polls SQLite for completed-but-unpublished cells. # PUBLISHER_POLL_MS=10000