mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-08 16:49:02 +03:00
[GH-ISSUE #160] Use environment variables for configuration #76
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @akelge on GitHub (Dec 23, 2022).
Original GitHub issue: https://github.com/sigoden/dufs/issues/160
Specific Demand
If I wish to run it in Docker or Kubernetes, it would be nice to use env vars or a config file to configure the features
Implement Suggestion
Parse env vars with names like
DUFS_FEATURE_WITH_DASH_REPLACED_WITH_UNDERSCORESlikeDUFS_ALLOW_ALL=trueorDUFS_AUTH_METHOD=digestand possibly support also a config file, with the cli flags in lowercase and with dash replaced by underscores, YAML or INI format.
In this case it would be nice to have a CLI flag like
--config <configfile>and an env var likeDUFS_CONFIGFILE=<configfile>and, maybe, a default path like./config.yaml