Config option to autoload secrets into ENV #1052
nickhammond
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm finding that with the secrets change there are quite a few use cases for setting details in your deploy recipe via values from ENV. Right now secrets are automatically loaded but only supported for args/clear/secrets settings.
Pre Kamal 2, dotenv would load everything into ENV from your
.env
file which is now.kamal/secrets
. This brought its own issues but the main one being that.env
is utilized by quite a few tools/projects and it wasn't immediately obvious that Kamal would load your.env
. Now that we have a Kamal-specific secrets file(.kamal/secrets
), autoloading or providing the option to autoload your secrets seems like something that'd be great to support.The workaround right now for anyone that needs to utilize
ENV
in their deploy recipe is to require dotenv and load your secrets at the beginning of your deploy recipe.Which feels a bit off to work with Ruby like this in a yml file.
What about something like:
With a default value of:
Use cases for loading ENV into your deploy.yml recipe:
#998 (comment)
#1040 (reply in thread)
#1038 (comment)
Beta Was this translation helpful? Give feedback.
All reactions