Skip to content
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

Config/CLI: Rename --config-file to --defaults-yaml and improve command help #2250

Closed
lastzero opened this issue Apr 13, 2022 · 0 comments
Closed
Assignees
Labels
docs 📚 Write, improve, or review documentation enhancement Refactoring, improvement or maintenance task released Available in the stable release

Comments

@lastzero
Copy link
Member

As a CLI user, the use of the flags is clearer if --config-file is renamed to --defaults-yaml, as I would otherwise expect it to be possible to set all configuration values in the YAML file passed as an argument.

If you pass a YAML file via --defaults-yaml/--config-file`, the values are only used to set defaults. These can still be overridden by CLI parameters and environment variables (which are always present in most Docker/Cloud environments, so you can't really change anything).

In case you want PhotoPrism to ignore the environment and prefer values from a configuration file instead, you should use the --config-path flag / the PHOTOPRISM_CONFIG_PATH variable:

  • Values in [config-path]/options.yml always take precedence over CLI flags and environment variables if present
  • Options changed in the advanced settings UI are automatically stored here
  • To avoid write conflicts, it is best to modify the options.yml file only when the backend is not running
  • Command help has been updated to explain which flag does what (which wasn't really the case before)
@lastzero lastzero self-assigned this Apr 13, 2022
@lastzero lastzero added enhancement Refactoring, improvement or maintenance task docs 📚 Write, improve, or review documentation please-test Ready for acceptance test labels Apr 13, 2022
lastzero added a commit to photoprism/photoprism-docs that referenced this issue Apr 22, 2022
@graciousgrey graciousgrey added released Available in the stable release and removed please-test Ready for acceptance test labels May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs 📚 Write, improve, or review documentation enhancement Refactoring, improvement or maintenance task released Available in the stable release
Projects
Status: Release 🌈
Development

No branches or pull requests

2 participants