Replace toml configuration with CLI + env args
#650
Closed
Mirko-von-Leipzig
started this conversation in
General
Replies: 3 comments 10 replies
-
|
We can use dotenvy for the |
Beta Was this translation helpful? Give feedback.
7 replies
-
|
@bobbinth one possible issue is with the genesis block configuration. I imagine that would have to remain a We can add a default so that we don't have to keep an actual |
Beta Was this translation helpful? Give feedback.
3 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Originally suggested in #647, paraphrasing motivation here.
tomlfiles are nice for low-change, manual configuration as it gets out of the way for conventional use. It is however poorly suited for scripting and devops workflows:initstep, and an extra file to manage.grep/sedisn't good enough as you need a section parser (e.g. there are multipleendpoint = xxxlines under different sections.I propose shifting to a fully CLI/clap based approach. We could combine this with
tomlfiles by havingcliargs take precedence but in my experience this becomes a pain to maintain. The "optimal" naming scheme is also often different between the two so things drift.There are situations where having file based configuration is great. One example is updating configs across multiple instances to identical settings - ideally you just copy the file around. Or users that don't want to specify a long list of non-default cli args (though the latter could be done via alias). For this usage I propose environment args.
clapsupports these out of the box, and does the correct thing. File configuration then becomes a.envfile.An additional bonus is that many deployment tools support env var based flows, e.g. systemd service files let you specify env variables, or even
.envfiles. Similarly in docker.This is a rather large breaking change; so I'd like to get consensus on this before proceeding.
Beta Was this translation helpful? Give feedback.
All reactions