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-dump prints incorrect values for some keys #2558

Open
xfzv opened this issue Mar 23, 2024 · 3 comments
Open

-config-dump prints incorrect values for some keys #2558

xfzv opened this issue Mar 23, 2024 · 3 comments

Comments

@xfzv
Copy link

xfzv commented Mar 23, 2024

% miniflux -i
Version: 2.1.1
Commit: 382885f
Build Date: 2024-03-10T17:53:43+0000
Go Version: go1.22.0
Compiler: gc
Arch: amd64
OS: linux
% cat "/etc/miniflux.conf"
RUN_MIGRATIONS=1
DATABASE_URL="user=postgres password=postgres dbname=miniflux2 sslmode=disable"
CLEANUP_ARCHIVE_READ_DAYS=30
FETCH_ODYSEE_WATCH_TIME=1
FETCH_YOUTUBE_WATCH_TIME=1

"Global configuration options" section in "Settings > About" displays correct settings. However, I noticed that % miniflux -config-dump seems to print default values instead of those set in /etc/miniflux.conf.

A diff between what is displayed in "Global configuration options" and what % miniflux -config-dump prints.

  • +/green = from "Global configuration options" (correct)
  • -/red = from -config-dump (incorrect)
+ CLEANUP_ARCHIVE_READ_DAYS=30
- CLEANUP_ARCHIVE_READ_DAYS=60

+ FETCH_ODYSEE_WATCH_TIME=true
- FETCH_ODYSEE_WATCH_TIME=false

+ FETCH_YOUTUBE_WATCH_TIME=true
- FETCH_YOUTUBE_WATCH_TIME=false

+ RUN_MIGRATIONS=true
- RUN_MIGRATIONS=false

Am I missing something?

@xfzv
Copy link
Author

xfzv commented Mar 23, 2024

Turns out

% miniflux -config-dump -c "/etc/miniflux.conf"

prints the correct values.

Maybe this is the expected behavior? i.e -config-dump prints default values and adding -c, --config-file /path/to/miniflux.conf prints values from miniflux.conf

From the man page:

OPTIONS
       -config-dump
           Print parsed configuration values. This will include sensitive information like passwords.

To me, -config-dump should print whatever is in /etc/miniflux.conf without having to add -c, --config-file /path/to/miniflux.conf (due to the sensitive information warning).

@fguillot
Copy link
Member

This is the intended behavior. By default, Miniflux parses only environment variables. The configuration file is optional and need to be specified explicitly.

The official Docker image, and the RPM/Debian packages uses only environment variables by default.

I would be happy to improve the docs if it's not clear.

@xfzv
Copy link
Author

xfzv commented Mar 25, 2024

Thank you for the details!

I'm using Miniflux on Gentoo / Arch Linux so I went with miniflux systemd service + /etc/miniflux.conf. That's why I thought the values were not parsed correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants