mealie-recipes / mealie

Mealie is a self hosted recipe manager and meal planner with a RestAPI backend and a reactive frontend application built in Vue for a pleasant user experience for the whole family. Easily add recipes into your database by providing the url and mealie will automatically import the relevant data or add a family recipe with the UI editor
https://docs.mealie.io
GNU Affero General Public License v3.0
6.81k stars 700 forks source link

feat: control reading `/run/secrets` via USE_SECRETS_DIR env var #3948

Closed akrantz01 closed 1 month ago

akrantz01 commented 2 months ago

What type of PR is this?

What this PR does / why we need it:

Adds a new environment variable called USE_SECRETS_DIR that controls whether secrets are loaded from /run/secrets. It is enabled by default to maintain the existing behaviour.

This prevents issues in non-Docker environments where /run/secrets may not exist or be readable by the current user.

Which issue(s) this PR fixes:

Fixes #3852

Testing

For each scenario, a new dev container environment was created.

/run/secrets is readable and contains a file for LDAP_SERVER_URL:

/run/secrets is not readable (follow instructions in issue) and contains a file for LDAP_SERVER_URL:

/run/secrets does not exist:

michael-genson commented 1 month ago

This issue should be addressed by https://github.com/mealie-recipes/mealie/pull/4002

Happy to look at this one if you think it offers something not addressed by https://github.com/mealie-recipes/mealie/pull/4002, if you could confirm either way

akrantz01 commented 1 month ago

Nope, that's great to see #4002 merged!