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
[Feature]: Take configuration from config file instead of env vars on Cosmovisor #19764
Comments
@julienrbrt need your thoughts here |
Yes it makes total sense. Thank you for writing this up. It should indeed be toml for consistency. |
Hey @julienrbrt. Can I work on this issue? |
Hi, yes! I'll be happy to review. Thank you! |
Just to confirm, by default we'll load configurations from the config file first and then overwrite them with any environment variables, if provided, correct? If this is the case then we don't need to initialise the config through |
Yea, but you still need to create the config the first time you use cosmovisor. So we should create the config at |
Summary
Moved from #19755:
It'd be nice if Cosmovisor would take configuration from config file instead of env vars.
Problem Definition
If a person is running Cosmovisor as a systemd service in background, with one set of variables, and then runs it via shell, with a different set of variables, for example invoking a command to show Cosmovisor config, it would use different params than the running node.
Real life example: I have the following env variables in
~/.zshrc
:and
cosmovisor config
shows the following:(for example, note the
UNSAFE_SKIP_BACKUP: false
line).But in fact my node's running as a systemd service with the following configuration:
(note the
Environment="UNSAFE_SKIP_BACKUP=true"
line).In fact it would actually avoid doing an upgrade, so running
cosmovisor config
produces misleading result.Proposed Feature
.toml
? as it's used elsewhere for configuration) that stores all Cosmovisor configuration.cosmovisor xxxx
commands, take the config not from env vars, but from this file.~/.cosmovisor/config.toml
.cosmovisor init
create this file if it's not presentMaybe it also makes sense to allow overriding the config's params via env variables, but I am not sure yet about that.
The text was updated successfully, but these errors were encountered: