feat: support _FILE
suffix for docker secrets (again)
#4958
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Actually reading
_FILE
variables in Docker (for docker secrets) through the entrypoint. Which patch the initial way of getting Docker secrets (prior to #3656 ) which simply doesn't work. This PR updates the documentation as well.Which issue(s) this PR fixes:
Not really an issue but more a forever-drafted PR that was supposed to work #3781
You can read more about this discussion and the stakes, everything is here, the author just does not seems to be active anymore. I just updated the feature to the last version of Mealie. All credits goes to @andrewvaughan though.
Testing
Change have already been tested by @DennisGaida on the above drafted PR. That said I double checked and succeed to setup a Mealie instance with a Postgres SQL DB using docker secrets using the following docker compose (modified from your prod version). I only used creds for Postgres and as every other variables work the same I assumed it won't be a big deal (the entrypoint is now just reading files instead of strings on some conditions, nothing should be breaking) as testing them all would take much more time and environment setup.
This also included creating some dummy secrets files, as you can see. I created them locally in the Docker directory for some sketchy testing but they are not included in the PR.