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

Read from env vars and cli flag options #35

Open
AngelMunoz opened this issue Oct 29, 2024 · 0 comments
Open

Read from env vars and cli flag options #35

AngelMunoz opened this issue Oct 29, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@AngelMunoz
Copy link
Owner

Is your feature request related to a problem? Please describe.
After playing around with a project of mine (https://github.com/AngelMunoz/Openapo) I realized that if I want to run migrondi from CI currently I need to specify a migrondi.json file which is cumbersome to replace by environment or override within CI scripts which is not ideal, the alternative is to have an F# project that is in charge of running the migrations and has the configurations but it would also need to read from the environment or something similar in a manual way, again not ideal.

Describe the solution you'd like

I'd love to have three ways to read the configuration options from the CLI, an example of this was this weird implementation in Perla https://github.com/AngelMunoz/Perla/blob/dev/src/Perla/Configuration.fs#L447-L547

which basically reads in the following way

  • file if present
  • env vars if present (it was not implemented in perla, but the placeholder fn was there)
  • cli args/options if present

Describe alternatives you've considered

  • Not do a thing

Additional context

N/A

@AngelMunoz AngelMunoz added the enhancement New feature or request label Oct 29, 2024
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

No branches or pull requests

1 participant