Skip to content

docs: reorganize database settings for Plane AI and update environment variable documentation#241

Merged
danciaclara merged 8 commits intomasterfrom
fix-db-settings-pi
Mar 13, 2026
Merged

docs: reorganize database settings for Plane AI and update environment variable documentation#241
danciaclara merged 8 commits intomasterfrom
fix-db-settings-pi

Conversation

@akshat5302
Copy link
Member

@akshat5302 akshat5302 commented Mar 11, 2026

Description

This pull request updates documentation to clarify and reorganize how the Plane AI service handles database configuration, particularly regarding the use of a PostgreSQL read replica. The changes improve the visibility and explanation of relevant environment variables for both general environment setup and Kubernetes installation methods.

Type of Change

  • Improvement (change that would cause existing functionality to not work as expected)

Summary by CodeRabbit

  • Documentation
    • Consolidated self-hosting configuration docs to create a dedicated Plane AI Database section and moved Plane AI-related database settings there.
    • Added guidance for connecting Plane AI to a separate database and introduced documentation for a read-replica connection option.
    • Updated Kubernetes deployment docs to surface the Plane AI database read-replica configuration and secret-management guidance.

@vercel
Copy link

vercel bot commented Mar 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
developer-docs Ready Ready Preview, Comment Mar 13, 2026 10:44am

Request Review

@coderabbitai
Copy link

coderabbitai bot commented Mar 11, 2026

📝 Walkthrough

Walkthrough

Moved Plane AI database settings out of the general Database section into a new Plane AI Database subsection, added PLANE_PI_DATABASE_URL, and introduced a follower PostgreSQL URI (FOLLOWER_POSTGRES_URI / env.pi_envs.follower_postgres_uri) for Plane AI Kubernetes deployments as a read-replica connection string.

Changes

Cohort / File(s) Summary
Environment Variables Reorganization
docs/self-hosting/govern/environment-variables.md
Removed several general DB env entries and added a new "Plane AI Database settings" subsection declaring PLANE_PI_DATABASE_URL and FOLLOWER_POSTGRES_URI with descriptions and defaults.
Kubernetes Deployment Documentation
docs/self-hosting/methods/install-methods-commercial/kubernetes.md, docs/self-hosting/methods/kubernetes.md
Added Plane AI database guidance and surfaced env.pi_envs.follower_postgres_uri / FOLLOWER_POSTGRES_URI as an external-secret and env var for Kubernetes, documenting it as a PostgreSQL read-replica URI and providing examples.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 I hop through docs with careful cheer,

New DB paths now appear.
A follower URI to share the load,
Read replicas lighten the road.
Hooray — the meadow's tidy and clear.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: reorganizing database settings and updating environment variable documentation specifically for Plane AI, which aligns with the file modifications across three documentation files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-db-settings-pi
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/self-hosting/govern/environment-variables.md`:
- Around line 176-181: The new "#### Database settings" table block is not
Prettier-formatted; run Prettier (or your project's formatting script) on the
Markdown file to fix spacing/alignment issues and ensure the table under the
"#### Database settings" header and rows for FOLLOWER_POSTGRES_URI and
PLANE_PI_DATABASE_URL conform to the repo's Markdown formatting rules so CI
passes.
- Around line 178-181: The table's FOLLOWER_POSTGRES_URI description is
ambiguous next to PLANE_PI_DATABASE_URL; update its Description to explicitly
state that FOLLOWER_POSTGRES_URI is a read-replica of the primary Plane app
database and mirrors the main DATABASE_URL (not the PLANE_PI_DATABASE_URL). Edit
the row for FOLLOWER_POSTGRES_URI so the Description reads something like:
"Connection string for a PostgreSQL read replica of the primary Plane app
database (same value as DATABASE_URL) — used for read-heavy operations to reduce
load on the primary database," leaving PLANE_PI_DATABASE_URL unchanged.

In `@docs/self-hosting/methods/install-methods-commercial/kubernetes.md`:
- Line 458: The docs add env.pi_envs.follower_postgres_uri but do not document
its secret-backed name in the pi_api_env_existingSecret table; add a new row
alongside the PLANE_PI_DATABASE_URL entry mapping FOLLOWER_POSTGRES_URI to the
same secret-backed path convention (e.g., the external secret key used for the
follower DB connection string) so external-secrets users can supply
follower_postgres_uri via a secret rather than values.yaml; update the
pi_api_env_existingSecret table to include FOLLOWER_POSTGRES_URI with a clear
description and example secret key to match PLANE_PI_DATABASE_URL.
- Line 458: The new Markdown table row for env.pi_envs.follower_postgres_uri is
misformatted for Prettier; run Prettier (or your repo's formatting command) on
docs/self-hosting/methods/install-methods-commercial/kubernetes.md to reflow the
table so the pipe alignment and spacing match the surrounding table rows,
ensuring the row text "env.pi_envs.follower_postgres_uri | Same as Plane
DATABASE_URL | No | Connection string for a Plane PostgreSQL DB read replica.
Used for read-heavy operations to reduce load on the primary database." is
properly padded and wrapped to pass the repo Prettier check.

In `@docs/self-hosting/methods/kubernetes.md`:
- Line 456: Add documentation for the external-secret mapping for the Plane
read-replica by adding an entry to the pi_api_env_existingSecret table that
corresponds to env.pi_envs.follower_postgres_uri; specify the values.yaml key
(env.pi_envs.follower_postgres_uri) and show the expected external-secret
path/secret name and secret key users must set (the secret name used by
external-secrets and the key containing the replica DATABASE_URL), and ensure
the text explains this is the connection string for the Plane PostgreSQL read
replica used for read-heavy operations.
- Line 456: The Markdown table row for env.pi_envs.follower_postgres_uri is
hand-aligned and contains extra spacing/trailing whitespace causing Prettier
failures; fix it by rewriting that single row as a minimal pipe-separated entry
(no manual column alignment or trailing spaces) e.g. "|
env.pi_envs.follower_postgres_uri | Same as Plane DATABASE_URL | No | Connection
string for a Plane PostgreSQL DB read replica. Used for read-heavy operations to
reduce load on the primary database. |", ensure the line stays under 120 chars,
then run the project's Prettier (with the repo config: 120 char width, 2-space
indent, semicolons, double quotes) to reformat and commit.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 437ffd5f-3762-4ddb-a407-dd16049dc61a

📥 Commits

Reviewing files that changed from the base of the PR and between 224c2c0 and 45825f2.

📒 Files selected for processing (3)
  • docs/self-hosting/govern/environment-variables.md
  • docs/self-hosting/methods/install-methods-commercial/kubernetes.md
  • docs/self-hosting/methods/kubernetes.md

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (2)
docs/self-hosting/govern/environment-variables.md (2)

188-191: ⚠️ Potential issue | 🟡 Minor

Run Prettier on this new table block before merge.

CI is already failing on formatting, and this subsection is part of the modified Markdown table content. Please reformat the table so the file passes the style check. As per coding guidelines, **/*.{ts,tsx,js,jsx,vue,json,md,mts}: "Prettier formatting checks must pass in CI, with 120 character line width, 2-space indent, semicolons, double quotes, and ES5 trailing commas".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/self-hosting/govern/environment-variables.md` around lines 188 - 191,
The new Markdown table block containing the FOLLOWER_POSTGRES_URI and
PLANE_PI_DATABASE_URL rows is not Prettier-formatted; run the project's Prettier
with the repo config (120 char line width, 2-space indent, double quotes,
semicolons/ES5 trailing commas) against the modified Markdown and reformat the
table so column alignment and wrapping conform to Prettier, then stage and
commit the updated file so CI formatting checks pass.

190-190: ⚠️ Potential issue | 🟡 Minor

Clarify that FOLLOWER_POSTGRES_URI points to the main Plane app database replica.

Line 190 still reads generically next to PLANE_PI_DATABASE_URL, so it's easy to interpret this as a replica of the PI database. Make the description explicit that this is the read replica for the primary Plane app database / DATABASE_URL.

Suggested wording
-| **FOLLOWER_POSTGRES_URI** | Connection string for a PostgreSQL read replica. Used for read-heavy operations to reduce load on the primary database.                                                    | Same as DATABASE_URL                |
+| **FOLLOWER_POSTGRES_URI** | Connection string for a PostgreSQL read replica of the primary Plane app database. Same as `DATABASE_URL`; used for read-heavy operations to reduce load on the primary database. | Same as DATABASE_URL                |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/self-hosting/govern/environment-variables.md` at line 190, The doc entry
for FOLLOWER_POSTGRES_URI is ambiguous; update its description to explicitly
state that FOLLOWER_POSTGRES_URI is the connection string for the PostgreSQL
read-replica of the primary Plane application database (the same database
referenced by DATABASE_URL), not a replica of PLANE_PI_DATABASE_URL; change the
table cell text for FOLLOWER_POSTGRES_URI to something like “Connection string
for the PostgreSQL read-replica of the primary Plane app database (used for
read-heavy operations to reduce load on DATABASE_URL)” and, if present,
disambiguate any neighboring PLANE_PI_DATABASE_URL text to avoid implying the
follower is for the PI DB.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@docs/self-hosting/govern/environment-variables.md`:
- Around line 188-191: The new Markdown table block containing the
FOLLOWER_POSTGRES_URI and PLANE_PI_DATABASE_URL rows is not Prettier-formatted;
run the project's Prettier with the repo config (120 char line width, 2-space
indent, double quotes, semicolons/ES5 trailing commas) against the modified
Markdown and reformat the table so column alignment and wrapping conform to
Prettier, then stage and commit the updated file so CI formatting checks pass.
- Line 190: The doc entry for FOLLOWER_POSTGRES_URI is ambiguous; update its
description to explicitly state that FOLLOWER_POSTGRES_URI is the connection
string for the PostgreSQL read-replica of the primary Plane application database
(the same database referenced by DATABASE_URL), not a replica of
PLANE_PI_DATABASE_URL; change the table cell text for FOLLOWER_POSTGRES_URI to
something like “Connection string for the PostgreSQL read-replica of the primary
Plane app database (used for read-heavy operations to reduce load on
DATABASE_URL)” and, if present, disambiguate any neighboring
PLANE_PI_DATABASE_URL text to avoid implying the follower is for the PI DB.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 033bc469-30f6-4dd4-8b45-ad78b1084fb2

📥 Commits

Reviewing files that changed from the base of the PR and between 45825f2 and e329a21.

📒 Files selected for processing (1)
  • docs/self-hosting/govern/environment-variables.md

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/self-hosting/methods/install-methods-commercial/kubernetes.md`:
- Line 462: Update the default wording for env.pi_envs.follower_postgres_uri in
the Kubernetes docs table from "Same as Plane DATABASE_URL" to exactly "Same as
DATABASE_URL" so it matches the authoritative reference in
docs/self-hosting/govern/environment-variables.md; locate the table row
containing env.pi_envs.follower_postgres_uri and replace the default cell text
accordingly.

In `@docs/self-hosting/methods/kubernetes.md`:
- Line 459: The requirement note currently references the wrong Helm key; update
the text that mentions `postgres.local_setup=false` to use the correct
namespaced key `services.postgres.local_setup=false` (and, if applicable
elsewhere in the same sentence, ensure any Plane AI toggle references the
matching namespaced key such as `services.plane_ai.enabled`) so the line for
`env.pg_pi_db_remote_url` accurately directs users to the `services.*` Helm keys
used in this document.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3f77cde8-6b74-45b8-a3e4-1790cc4a4251

📥 Commits

Reviewing files that changed from the base of the PR and between e329a21 and 4a2a646.

📒 Files selected for processing (3)
  • docs/self-hosting/govern/environment-variables.md
  • docs/self-hosting/methods/install-methods-commercial/kubernetes.md
  • docs/self-hosting/methods/kubernetes.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/self-hosting/govern/environment-variables.md

| services.pi.annotations | {} | | Custom annotations to add to the Plane AI API deployment. |
| env.pg_pi_db_name | plane_pi | | PostgreSQL database name used by Plane AI when `postgres.local_setup=true`. |
| env.pg_pi_db_remote_url | "" | | PostgreSQL connection URL for Plane AI when using a remote database. Required when `postgres.local_setup=false` and Plane AI is enabled. |
| env.pi_envs.follower_postgres_uri | Same as Plane DATABASE_URL | No | Connection string for a Plane PostgreSQL DB read replica. Used for read-heavy operations to reduce load on the primary database. |
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Inconsistent default value wording with authoritative docs.

Line 462 states the default as "Same as Plane DATABASE_URL", but the authoritative reference documentation at docs/self-hosting/govern/environment-variables.md shows this as "Same as DATABASE_URL" (without the word "Plane"). This inconsistency could confuse users.

For consistency across documentation, please update the default value to match the reference:

-| env.pi_envs.follower_postgres_uri |            Same as Plane DATABASE_URL            |    No    | Connection string for a Plane PostgreSQL DB read replica. Used for read-heavy operations to reduce load on the primary database.         |
+| env.pi_envs.follower_postgres_uri |            Same as DATABASE_URL            |    No    | Connection string for a Plane PostgreSQL DB read replica. Used for read-heavy operations to reduce load on the primary database.         |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| env.pi_envs.follower_postgres_uri | Same as Plane DATABASE_URL | No | Connection string for a Plane PostgreSQL DB read replica. Used for read-heavy operations to reduce load on the primary database. |
| env.pi_envs.follower_postgres_uri | Same as DATABASE_URL | No | Connection string for a Plane PostgreSQL DB read replica. Used for read-heavy operations to reduce load on the primary database. |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/self-hosting/methods/install-methods-commercial/kubernetes.md` at line
462, Update the default wording for env.pi_envs.follower_postgres_uri in the
Kubernetes docs table from "Same as Plane DATABASE_URL" to exactly "Same as
DATABASE_URL" so it matches the authoritative reference in
docs/self-hosting/govern/environment-variables.md; locate the table row
containing env.pi_envs.follower_postgres_uri and replace the default cell text
accordingly.

| services.pi.labels | {} | | Custom labels to add to the Plane AI API deployment. |
| services.pi.annotations | {} | | Custom annotations to add to the Plane AI API deployment. |
| env.pg_pi_db_name | plane_pi | | PostgreSQL database name used by Plane AI when `postgres.local_setup=true`. |
| env.pg_pi_db_remote_url | "" | | PostgreSQL connection URL for Plane AI when using a remote database. Required when `postgres.local_setup=false` and Plane AI is enabled. |
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Use the correct Helm key namespace in the requirement note.

Line 459 references postgres.local_setup=false, but this doc’s settings use services.postgres.local_setup. This can mislead users into setting the wrong key.

Suggested fix
-| env.pg_pi_db_remote_url           |                        ""                        |          | PostgreSQL connection URL for Plane AI when using a remote database. Required when `postgres.local_setup=false` and Plane AI is enabled. |
+| env.pg_pi_db_remote_url           |                        ""                        |          | PostgreSQL connection URL for Plane AI when using a remote database. Required when `services.postgres.local_setup=false` and Plane AI is enabled. |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/self-hosting/methods/kubernetes.md` at line 459, The requirement note
currently references the wrong Helm key; update the text that mentions
`postgres.local_setup=false` to use the correct namespaced key
`services.postgres.local_setup=false` (and, if applicable elsewhere in the same
sentence, ensure any Plane AI toggle references the matching namespaced key such
as `services.plane_ai.enabled`) so the line for `env.pg_pi_db_remote_url`
accurately directs users to the `services.*` Helm keys used in this document.

@danciaclara danciaclara merged commit f0704cb into master Mar 13, 2026
8 checks passed
@danciaclara danciaclara deleted the fix-db-settings-pi branch March 13, 2026 11:12
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.

2 participants