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

Env vars handling proposal #1282

Closed
acelaya opened this issue Dec 18, 2021 · 0 comments · Fixed by #1326
Closed

Env vars handling proposal #1282

acelaya opened this issue Dec 18, 2021 · 0 comments · Fixed by #1326
Milestone

Comments

@acelaya
Copy link
Member

acelaya commented Dec 18, 2021

Right now there are three levels of config.

  • Hardcoded one
  • Env vars (overrides previous one)
  • Installer options (overrides previous two)

Ideally, it should work this way.

  • Hardcoded one
  • Installer options (overrides previous one)
  • Env vars (overrides previous two)

But it's not possible the way it is implemented now, because the logic to read env vars is defined in config files, next to the base config they override (which is quite convenient).

And then, the installer options sit on another file, which overrides everything.

The options to change the behavior are.

  • Move the logic to read env vars to another config file which always overrides installer options. not really an option, as it would always override the installer config no matter what.
  • Move the logic to read env vars to a config post processor which overrides config dynamically, only if the appropriate env var had been defined.
  • Make the installer generate a config file which also includes the logic to load env vars on it.
  • Make the installer no longer generate the config structure, and instead generate a map with env vars and their values. Then Shlink would define those env vars if not defined already.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant