-
Notifications
You must be signed in to change notification settings - Fork 786
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
Support passing configs via env vars #4734
Comments
My hesitation about env vars is that they get silently ignored if you typo the variable name. It's probably something we could still have a go at though. Our track record with making sweeping changes to the CLI arg parsing is... not good however. We're on an old arg-parsing library at the moment, and previous attempts to add config file support bit-rotted and never merged (cf. #2748). |
True, that mistyping could have adverse effects. Wondering how I'd solve it (for us too), perhaps one way would be to iterate over all the |
Is this feature still being considered? This would make docker setups less painful to configure. |
It’s been merged and released months ago :)
…On Sun, 21 Jan 2024 at 17:32, protolambda ***@***.***> wrote:
Is this feature still being considered? This would make docker setups less
painful to configure.
—
Reply to this email directly, view it on GitHub
<#4734 (comment)>,
or unsubscribe
</~https://github.com/notifications/unsubscribe-auth/AAA7UGLJCBVLJYN5S5DINFDYPU7K7AVCNFSM6AAAAAA4X7QH5KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBSGY4DQMJYGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Oh shit, wrong repo, sorry for the noise
…On Sun, 21 Jan 2024 at 19:35, Péter Szilágyi ***@***.***> wrote:
It’s been merged and released months ago :)
On Sun, 21 Jan 2024 at 17:32, protolambda ***@***.***>
wrote:
> Is this feature still being considered? This would make docker setups
> less painful to configure.
>
> —
> Reply to this email directly, view it on GitHub
> <#4734 (comment)>,
> or unsubscribe
> </~https://github.com/notifications/unsubscribe-auth/AAA7UGLJCBVLJYN5S5DINFDYPU7K7AVCNFSM6AAAAAA4X7QH5KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBSGY4DQMJYGM>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
Linking related latest issue to overhaul the CLI |
Any chance this feature can be implemented, now that the mainnet Dencun release is out of the way? I am still interested in being able to configure lighthouse this way. |
We've just introduced a nifty feature into Geth where you can specify configurations in env vars too, not only cli flags. Each flag is mapped to an env var automatically, so it's fairly obvious and easy to understand.
E.g.
--state.scheme
would beGETH_STATE_SCHEME
Wondering if Lighthouse has a similar feature planned?
The benefit of this is that in many cloud or container provider settings, the usual way to configure stuff is via env vars. Most providers allow you to define env vars in templates, add defaults, docs, etc to them, making these templates easy to redistribute and even check for issues. Although they usually also support passing CLI flags, that's just one mega-mess of a single string containing everything, so it's very brittle.
My assumption is that whatever CLI library you're using already has support for env vars, you just need to tell them which var is mapped to which flag.
The text was updated successfully, but these errors were encountered: