Closed m4rk055 closed 2 years ago
I redefined the scope of this issue to PCE only, as discussed with @m4rk055.
The same approach should still be favoured for other backend projects IMHO (ping @TheKinrar).
I do not understand how this is better than having default values for env variables, internally in the project, as this requires an extra step to run the component
IMHO, it isn't :wink: Convention over configuration is a better approach in most cases.
For the PCE, I believe (but this would need to be confirmed by @m4rk055) a "default configuration" would not be really relevant as this is really important information which have to be set by the client (e.g. there is no default company name). Those "default values" are for tutorials and demonstrations only, and could change depending on what this tutorial or demonstration actually requires.
@TheKinrar I was considering what you said. Having certain env variables defined internally is ok but some of them are directly related to configuration of other components (e.g. database password). In that case, we have to synchronize the values between multiple projects which is simpler to do in an env file than changing the sources. The step to export the env variables can certainly be automated.
Sure! All I'm saying is, we should not remove default values from the components, even if they're also in a default env file. An environment file makes no difference to the component after all if we're just importing it before start.
For a better developer guide in devkit projects, simplify usage of environment variables. One option is to have default environment variables defined in an
env
file and run e.g.