microsoft / code-with-engineering-playbook

This is the playbook for "code-with" customer or partner engagements

Home Page:https://microsoft.github.io/code-with-engineering-playbook/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

App code loading environment variable?

scgbear opened this issue · comments

Is your feature request related to a problem? Please describe.
I find the guidance provided by https://microsoft.github.io/code-with-engineering-playbook/continuous-delivery/secrets-management/ to be incomplete.

I feel like we shouldn't be providing guidance that puts the application responsible for loading it's own environment variables. This shouldn't be the responsibility of the application code, it should be the responsibility of the hosting environment. Each hosting environment has mechanisms for performing that, to include the development machine.

Describe the solution you'd like
I'd like to see examples for configuring the different hosting environments to use .env files instead of examples of the application loading it's own files. e.g. for VSCode configuring the launch.json properties to use the envFile property to load the variables, or docker-compose.yml for running a dockerfile using the .env file etc.

Describe alternatives you've considered
NA

Additional context
NA

I agree - I have examples of what you suggest, I would like to put something together