Suggestions to .env files #127
Replies: 5 comments 1 reply
-
|
Beta Was this translation helpful? Give feedback.
-
A bit of unbiased input on my experience of .env files. Personally I almost always use docker for dev and live so env vars can be set via the compose/stack configs, so not sure the .env file approach is a requirement, but understand there are benefits.
Let me know if i can be of any more help - or if im not helping at all :) |
Beta Was this translation helpful? Give feedback.
-
@binary-vision @KinyaElGrande Thanks for your explanation. I don't know yet what will determine which file to use. I first assumed that a user would rename .env.testing to .env if the user needs it. For example, if the application finds out that tests are running, it is already too late (to suddenly choose .env.testing). Then the files have already been loaded and the configuration has been set up. Perhaps it is good to be able to give a flag to the CLI to determine which environment file to use. Would that be a solution? |
Beta Was this translation helpful? Give feedback.
-
I guess it depends what you are trying to achieve/solve. Have you thought about utilising makefiles for example? |
Beta Was this translation helpful? Give feedback.
-
@binary-vision Makefiles can be very useful indeed. If Confetti offers more options that cannot be available in the standard CLI tool, I will certainly consider makefiles. @KinyaElGrande I am now going to program that you can determine with a parameter which env file should be loaded. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
All reactions