Skip to content

More Configuration Options If Config File Not Found In Default Location #345

@stevenzeiler

Description

@stevenzeiler

Currently running saito requires that there be a configuration file present under the current directory/configuration however this may not match realistic expectations when running saito in production. When executing the saito binary from a different directory it panics with thread 'main' panicked at 'Failed to read configuration.: configuration file "/Users/zyler/github/saito-live/configuration/base" not found', /Users/zyler/github/saito-live/saito-rust/src/consensus.rs:136:44

Options for handling this gracefully would be:

  1. Sane defaults without a configuration file

  2. Allow path to configuration file to be specified via command line ie saito --config=/path/to/config.yml or via environment variable ie $SAITO_CONFIG_PATH

  3. If file not found search for configuration in a user-standard directory such as $HOME/.saito

  4. If user config directory is not found search in os-specific config path for instance /etc/saito on linux

This error I encountered when using homebrew to install saito on my mac, and realized the node operator onboarding experience could be improved with better configuration options.

(https://github.com/saito-live/homebrew-saito to try installation via homebrew on mac.)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions