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

Unterstützung von Umgebungsvariablen zur Konfiguration #405

Closed
StefanSchoof opened this issue Nov 6, 2020 · 7 comments
Closed

Unterstützung von Umgebungsvariablen zur Konfiguration #405

StefanSchoof opened this issue Nov 6, 2020 · 7 comments
Labels
enhancement New feature or request

Comments

@StefanSchoof
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Ich möchte gerne Passworter und andere Konfiguration soweit wie möglich trennen. (Berufskrankheit ;) ) Das ermöglicht mir meine Konfiguration einfach bei github hochzuladen (https://github.com/StefanSchoof/evcc-config) und somit kann ich einfach auf einen alten Config stand und habe schon ein Backup. (Nach Linus Torvalds: "Real men don’t use backups, they post their stuff on a public ftp server and let the rest of the world make copies." )

Describe the solution you'd like
Aktivieren Umgebungsvariablen in viper https://github.com/spf13/viper#working-with-environment-variables, so das man das Passwörter per Umgebungsvariable an evcc übergeben kann.

Describe alternatives you've considered
Platzhalter für Passwörter in der config, was zurück drehen der config und aktualisieren von gut schwieriger macht.

Additional context

@issue-label-bot issue-label-bot bot added the enhancement New feature or request label Nov 6, 2020
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label enhancement to this issue, with a confidence of 0.82. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@andig
Copy link
Member

andig commented Nov 6, 2020

@StefanSchoof AutomaticEnv ist bereits gesetzt. Bis auf den fehlenden Prefix sollte das also gehen. Mir ist allerdings nicht klar, wie das innerhalb von Listen wie z.B. den vehicles funktionieren soll?

@StefanSchoof
Copy link
Contributor Author

Aus https://github.com/spf13/viper#accessing-nested-keys. (GetInt("host.ports.1")) hatte ich gehofft, dass man VEHICLES_0_PASSWORD das Passwort setzen kann. Aber leider klappt, dass nicht.

@andig
Copy link
Member

andig commented Nov 6, 2020

SO oder viper Ticket aufmachen?

@StefanSchoof
Copy link
Contributor Author

Ich probiere und Google noch ein bisschen und mache das dann.

@StefanSchoof
Copy link
Contributor Author

Das ist ein Problem in viper: spf13/viper#935. Insgesamt scheint es mit dem Unmarshal und env vars nicht so gut zu gehen: spf13/viper#761

Denke daher, das ist nichts was man einfach hinbekommt :(

@andig
Copy link
Member

andig commented Nov 9, 2020

Schade :(

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

2 participants