Skip to content

feat: add environment variable management to project details and app configs#214

Open
AienTech wants to merge 1 commit into
caprover:masterfrom
AienTech:master
Open

feat: add environment variable management to project details and app configs#214
AienTech wants to merge 1 commit into
caprover:masterfrom
AienTech:master

Conversation

@AienTech

@AienTech AienTech commented May 12, 2026

Copy link
Copy Markdown

What does this PR do?

Adds UI for project-level environment variables, paired with the backend changes in caprover/caprover#2398.

  • models/ProjectDefinition.ts: adds envVars?: IAppEnvVar[] to the frontend type
  • containers/apps/ProjectDetailsEdit.tsx: adds an env var editor to the project create/edit form (individual key/value rows + bulk edit mode), with a description explaining that apps and sub-projects inherit these vars and can override them
  • containers/apps/appDetails/AppConfigs.tsx: adds a read-only "Inherited from project" panel above the app's own env vars; resolves the full project chain automatically; keys that the app has overridden are marked with an "overridden" badge; a tooltip explains how to override an inherited var

Why is this needed?

Companion UI for project-level env var inheritance. Without this, the backend feature has no way for users to set or inspect project env vars.

Is this a breaking change?

No. The inherited panel only renders when the app belongs to a project that has env vars set. All existing UI behaviour is unchanged.

@AienTech

AienTech commented Jun 2, 2026

Copy link
Copy Markdown
Author

hey @githubsaturn can this one be merged? there's also caprover/caprover#2398 connected to it

@githubsaturn

Copy link
Copy Markdown
Collaborator

This PR skipped the required design proposal check outlined here

I want to think about this proposed structure a bit more before merging it. Overall it makes sense. I just want to check if it does make sense to also add a CapRover level env vars that gets inherited, something like:

CapRover env >> project env >> app env

I need scout through the old threads and make sure we're building a scalable solution not a one off feature.

@githubsaturn

Copy link
Copy Markdown
Collaborator

nonetheless it's a really good feature, I just want to think through it a bit before committing on maintaining it..

@githubsaturn

githubsaturn commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Finally had a chance to think about this and I think this is the right approach. As a matter of fact we won't be handcuffed into this hierarchy. In the future, we can add a system level env var (if needed) that will be the first line of overrides....

So I am good with this approach. Can you please post some screenshots of difference cases (with override, without, etc etc) and we'll get it merged!

@AienTech

AienTech commented Jul 9, 2026

Copy link
Copy Markdown
Author

Finally had a chance to think about this and I think this is the right approach. As a matter of fact we won't be handcuffed into this hierarchy. In the future, we can add a system level env var (if needed) that will be the first line of overrides....

So I am good with this approach. Can you please post some screenshots of difference cases (with override, without, etc etc) and we'll get it merged!

Sure, will take care of it this weekend

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