Skip to content

automatically load configuration from file - #251

Open
Toniob wants to merge 1 commit into
wheelybird:masterfrom
Toniob:master
Open

automatically load configuration from file#251
Toniob wants to merge 1 commit into
wheelybird:masterfrom
Toniob:master

Conversation

@Toniob

@Toniob Toniob commented Jan 16, 2026

Copy link
Copy Markdown

According to the document, we have to add those lines if we’re not using the Docker version of the app. But we can add those lines in the main code. That way, if the env var is set, it will use the config file, otherwise, nothing changes.

@gucong3000

Copy link
Copy Markdown

I tested this in a non-Docker install and found one important edge case.

Using parse_ini_file with the default scanner can fail on common LDAP-style values in luminary.conf, especially DN values such as:
cn=admin,dc=example,dc=com

In that mode, the parser may throw syntax errors or mis-parse values unless users manually quote many fields. In practice, this makes the documented configuration fragile.

Suggestion:
Please consider using INI_SCANNER_RAW when loading CONFIG_FILE, for example:
parse_ini_file($config_file, false, INI_SCANNER_RAW)

Why this helps:

It preserves values exactly as written in luminary.conf
It avoids breakage for unquoted LDAP DN strings containing equals signs
It is compatible with current code, since booleans are already normalized later via string checks
This would make the non-Docker docs and real-world configs much more reliable.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants