Skip to content

Document environment variables and add example templates#6151

Draft
valkirilov wants to merge 3 commits into
mainfrom
docs/env-variables
Draft

Document environment variables and add example templates#6151
valkirilov wants to merge 3 commits into
mainfrom
docs/env-variables

Conversation

@valkirilov

@valkirilov valkirilov commented Jul 3, 2026

Copy link
Copy Markdown
Member

What

Adds a single, comprehensive reference for RedisInsight's environment variables and per-package .env.example templates.

  • 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.example and redisinsight/ui/.env.example — copy-paste templates co-located with each app's .env loader (cp .env.example .env).

The E2E suite already had tests/e2e-playwright/example.env, so that's linked rather than duplicated.

Desktop has no .env loader (it reads process.env directly; dev scripts inject vars via cross-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 .env files, 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.md catalogs RedisInsight-owned RI_* (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 at redisinsight/api/config/default.ts and redisinsight/ui/src/config/default.ts as source of truth), and notes such as UI vars being build-time inlined via Vite envPrefix: 'RI_' and Electron having no dotenv loader.

redisinsight/api/.env.example and redisinsight/ui/.env.example are commented starter templates next to each app’s .env loader; Playwright’s existing example.env is linked instead of duplicated. Desktop intentionally has no .env.example.

.gitignore now ignores .env* but allows !.env.example so 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.

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>
@valkirilov valkirilov requested a review from a team as a code owner July 3, 2026 11:54
@valkirilov valkirilov changed the title docs: document environment variables and add .env.example templates Document environment variables and add example templates Jul 3, 2026
@jit-ci

jit-ci Bot commented Jul 3, 2026

Copy link
Copy Markdown

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread docs/env-variables.md Outdated
Comment thread redisinsight/desktop/.env.example Outdated
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Code Coverage - Backend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 93.11% 16501/17723
🟡 Branches 75.3% 5231/6947
🟢 Functions 87.41% 2527/2891
🟢 Lines 92.96% 15777/16972

Test suite run success

3647 tests passing in 319 suites.

Report generated by 🧪jest coverage report action from 04e04c6

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Code Coverage - Integration Tests

Status Category Percentage Covered / Total
🟡 Statements 79.16% 18183/22969
🟡 Branches 61.91% 8464/13670
🟡 Functions 66.88% 2456/3672
🟡 Lines 78.77% 17119/21732

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Code Coverage - Frontend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 83.57% 26558/31779
🟡 Branches 69.23% 11297/16319
🟡 Functions 78.89% 7113/9016
🟢 Lines 84.03% 25881/30798

Test suite run success

7525 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>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread docs/env-variables.md Outdated
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>
@valkirilov valkirilov self-assigned this Jul 3, 2026
@valkirilov valkirilov marked this pull request as draft July 7, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant