Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create config loading from .yaml files #1

Closed
pavleprica opened this issue Nov 8, 2022 · 0 comments · Fixed by #2
Closed

Create config loading from .yaml files #1

pavleprica opened this issue Nov 8, 2022 · 0 comments · Fixed by #2
Assignees
Labels
enhancement New feature or request

Comments

@pavleprica
Copy link
Member

We would like to achieve to have the possibility to load predefined .yaml files for loading app configuration.

To give an example:
Let's assume we have three environments.

  • local
  • dev
  • prod

For the local environment, we could be free to specify any values, not being worried about security. For example if you are running a local postgress version, you don't mind if you commit the file with password: 12345.

Though for the dev and prod environment, we would want to abstract that to being read from a environment variable. So it would look more like password: ${DB_PASSWORD}.

An example of file content

config-local.yaml

database:
  username: user
  password: my-secret-pw

config-dev.yaml

database:
  username: ${DATABASE_USERNAME}
  password: ${DATABASE_PASSWORD}

In the config-dev.yaml example, it will load the environment config, and load from the system environment the values for these keys.

This of course has to be available and accessible through code for fetching values.

@pavleprica pavleprica self-assigned this Nov 8, 2022
@pavleprica pavleprica linked a pull request Nov 11, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant