feat: add environment variable management to project details and app configs#214
feat: add environment variable management to project details and app configs#214AienTech wants to merge 1 commit into
Conversation
|
hey @githubsaturn can this one be merged? there's also caprover/caprover#2398 connected to it |
|
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: I need scout through the old threads and make sure we're building a scalable solution not a one off feature. |
|
nonetheless it's a really good feature, I just want to think through it a bit before committing on maintaining it.. |
|
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 |
What does this PR do?
Adds UI for project-level environment variables, paired with the backend changes in caprover/caprover#2398.
models/ProjectDefinition.ts: addsenvVars?: IAppEnvVar[]to the frontend typecontainers/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 themcontainers/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 varWhy 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.