BOOTSTRAP_ADMIN_PASSWORD_PLAIN environment variable not respected #1139
-
Starting a container like this: docker run -it --rm \
-e LOCAL_TEST=true -e BOOTSTRAP_ADMIN_PASSWORD_PLAIN=testpassword \
-p 8443:8443 ghcr.io/sebadob/rauthy:0.31.3 Prints the following to the log:
I'd expect it to use the value given via the # overwritten by: BOOTSTRAP_ADMIN_PASSWORD_PLAIN
password_plain = '123SuperSafe' Am I missing something? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yes and no, not really. ^^ This happens because of the current parsing logic. The whole As an easy fix, I will probably just add all existing sections to the test config while some of them may stay empty. This would make it possible to "overwrite" non-existing values. Not sure if it's easy to adopt the current parsing logic and accept env vars only, if the section does not even exist at all. tl;dr to accept bootstrap values, you would have to create a config for now and at least add an empty Edit: Created #1140 to fix this. |
Beta Was this translation helpful? Give feedback.
Yes and no, not really. ^^
This happens because of the current parsing logic. The whole
[bootstrap]
section does not exist in the current local test config file. The issue is, that overwriting config vars via env will only happen, if the section exists in the first place. If it's not even there, the config parser will not even try to parse all vars inside that section, and therefore also not try to overwrite config vars from env.As an easy fix, I will probably just add all existing sections to the test config while some of them may stay empty. This would make it possible to "overwrite" non-existing values. Not sure if it's easy to adopt the current parsing logic…