Document environment variables and add example templates#6151
Document environment variables and add example templates#6151valkirilov wants to merge 3 commits into
Conversation
Add a single reference (docs/env-variables.md) covering all RedisInsight-owned environment variables — grouped by function, with scope (api/ui/desktop/e2e/build), default, and description — plus per-package .env.example templates for the API, UI, and desktop apps. RedisInsight is configured almost entirely through env variables, but until now their meaning and defaults lived only inline in the config files, scattered .env files, and a single Docker doc. This gives users and contributors one place to look and a copy-paste starting point next to each app's loader. Also un-ignore *.env.example in .gitignore (the broad .env* rule was hiding the templates). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6175211b3a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Code Coverage - Backend unit tests
Test suite run success3647 tests passing in 319 suites. Report generated by 🧪jest coverage report action from 04e04c6 |
Code Coverage - Integration Tests
|
Code Coverage - Frontend unit tests
Test suite run success7525 tests passing in 844 suites. Report generated by 🧪jest coverage report action from 04e04c6 |
Address Codex review on #6151: - Desktop has no dotenv/.env loader; its vars are read directly from the process environment (dev scripts inject them via cross-env). Correct the loader table and intro, and remove redisinsight/desktop/.env.example, which wrongly implied a copy-to-.env workflow. - START_MINIMIZED and UPGRADE_EXTENSIONS are presence-only (any value, incl. "false", enables them). Document them as presence-only and drop the misleading =false examples. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 197a311c0f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Address Codex review on #6151: RI_CORS_ORIGIN / RI_CORS_CREDENTIALS do not configure the API's global CORS — main.ts calls app.enableCors() with no options. Their only effect is the Access-Control-Allow-* headers on the payload-too-large (413) error response. Correct the descriptions accordingly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
What
Adds a single, comprehensive reference for RedisInsight's environment variables and per-package
.env.exampletemplates.docs/env-variables.md— every RedisInsight-owned env var, grouped by function. Each row has Scope (api/ui/desktop/e2e/build), Default, and Description.redisinsight/api/.env.exampleandredisinsight/ui/.env.example— copy-paste templates co-located with each app's.envloader (cp .env.example .env).The E2E suite already had
tests/e2e-playwright/example.env, so that's linked rather than duplicated.Desktop has no
.envloader (it readsprocess.envdirectly; dev scripts inject vars viacross-env), so it intentionally gets no.env.example— its variables are documented in the reference with a note on how they're actually provided.Why
RedisInsight is configured almost entirely through environment variables, but until now their meaning and defaults lived only inline in the config files (
redisinsight/api/config/default.ts,redisinsight/ui/src/config/default.ts), a few scattered.envfiles, and one Docker doc. There was no single place explaining what each variable does or a starting template for self-hosters.Note
Low Risk
Documentation and committed placeholder templates only; no application runtime or build logic changes.
Overview
Adds a central configuration reference so self-hosters and contributors no longer need to infer behavior from scattered config TypeScript files alone.
docs/env-variables.mdcatalogs RedisInsight-ownedRI_*(and related) variables by area—server, storage, security, Redis clients, cloud/OAuth, AI, telemetry, desktop, pre-setup databases, E2E, etc.—with scope (api/ui/desktop/e2e/build), defaults (pointing atredisinsight/api/config/default.tsandredisinsight/ui/src/config/default.tsas source of truth), and notes such as UI vars being build-time inlined via ViteenvPrefix: 'RI_'and Electron having no dotenv loader.redisinsight/api/.env.exampleandredisinsight/ui/.env.exampleare commented starter templates next to each app’s.envloader; Playwright’s existingexample.envis linked instead of duplicated. Desktop intentionally has no.env.example..gitignorenow ignores.env*but allows!.env.exampleso the templates can be committed without real secrets.Reviewed by Cursor Bugbot for commit 04e04c6. Bugbot is set up for automated code reviews on this repo. Configure here.