ctk
ctk copied to clipboard
Feature Request: Indicate "secure" environment variable
As a thought for the feature, it might be very useful to be able to indicate if an env variable is coming from a secret file and/or should a .env be generated rather than putting everything in the compose file.
@ravensorb I have been thinking about this. A few users requested a feature similar to what you are asking. It will work this way: a user logs has to log in first, and then they can define a global variable set for a project. This can act as both, a .env file with its contents to be exported, and as variable placeholders to be used in the forms. For example, using {{DB_PASS}} placeholder within the forms, so when the docker-compose.yml is generated with that placeholder, it grabs the value from the global variable set. Let me know what you think of this.
not only env variable, but it can be implemented on volume mount also. a fixed set of volume mount like /media/mount/Docker/ /media/mount/TV/ /media/mount/Movie/ /media/mount/Download/
hope you get the idea.
@basudip yea I totally get it. Ill drop a wireframe here tomorrow morning to gather some more thoughts before building it out.
Love it - might be nice to be able to set them at an admin/global level too?
@ravensorb yea thats the idea. "Project level", "Global level".
@ravensorb @basudip Here is my idea of global and project level variables, let me know what you think. Reading env vars from .env file falls into the recipes work, I need more time to think about this.
I think this makes a lot of sense. It looks easy to use -- maybe a way to filter by var name could be helpful too incase the list gets large?
Thinking this through "out loud"
- An admin can come in and add a global variable
- An admin can leverage a global variable as a token/ref within a template (volume, network, env, etc)
- A user can add a user variable
- A user can leverage a global or user variable as a token/ref within a template (volume, network, env, etc)
- These referenced variables would be "expanded" when the template is generated (env file or compose file)
Sound right (most of the above might be part of you recipe idea)?
yes, this makes absolute sense. create a selectable tag/label/icon where user/admin can define what type of variable it will be. like ENV variable or volume path etc.