- In the root command, all flags are now correctly available as environmental variables, except for `--config` flag. This was already supposed to be the case, but due to bugs in the implementation it didn't work properly.
- All configuration options (unless I missed something) that are available as flags should now properly update the configuration when using the `config init` and `config set` commands.
- Flag names are now consistently in the lowerCamelCase format. All flags that were in a different format have been updated in a backwards compatible way. For a transitionary period of at least 6 months, both will work:
- `--dir-mode` --> `--dirMode`
- `--hide-login-button` --> `--hideLoginButton`
- `--create-user-dir` --> `--createUserDir`
- `--minimum-password-length` --> `--minimumPasswordLength`
- `--socket-perm` --> `--socketPerm`
- `--disable-thumbnails` --> `--disableThumbnails`
- `--disable-preview-resize` --> `--disablePreviewResize`
- `--disable-exec` --> `--disableExec`
- `--disable-type-detection-by-header` --> `--disableTypeDetectionByHeader`
- `--img-processors` --> `--imageProcessors`
- `--cache-dir` --> `--cacheDir`
- `--token-expiration-time` --> `--tokenExpirationTime`
- `--baseurl` --> `--baseURL`
Fixes issue where token expiration time from config file was not saved
to database during initial setup, causing Docker deployments to ignore
the tokenExpirationTime setting.
Changes:
- Add TokenExpirationTime to quick setup initialization (cmd/root.go)
- Add TokenExpirationTime to config init command (cmd/config_init.go)
- Add token-expiration-time support to config set command (cmd/config_set.go)
- Display token expiration time in config cat output (cmd/config.go)
All initialization paths now properly read and save token expiration
settings from config files, environment variables, and CLI flags.
Fixes#3718, #3150, #2554, #2553
Related to #2753
The defaults remain the same as before.
For now, the config options are global instead of per-user.
Note also that the BoltDB creation maintains the old default mode of 0640
since it's not really a user-facing filesystem manipulation.
Fixes#5316, #5200