Open andrewvaughan opened 5 days ago
Note - in the documentation I added a presumption that this would be available in v1.10.0
. Please update as appropriate.
Hold on this - there may be a permissions issue accessing the secrets during an entrypoint script. I'm doing some more testing.
What type of PR is this?
Provides backwards-compatible support for the
_FILE
standard for Docker Compose secrets, per the secrets documentation:https://docs.docker.com/compose/use-secrets/
What this PR does / why we need it:
Please refer to discussion https://github.com/mealie-recipes/mealie/discussions/3773
Which issue(s) this PR fixes:
N/A - was recommended to submit a PR without an Issue by maintainers.
Special notes for your reviewer:
This also updates the documentation with best-practices and examples. This should be fully backwards-compatible with any existing Mealie install, as the method of implementation is to simply override the existing variable if a
_FILE
variable exists.The documentation changes explain this in further detail.
Testing
Only the entrypoint has been modified. If you wish to test this locally in a
bash
environment without creating a full container, copy the addedload_secrets
function into a session and test the various_FILE
capabilities by setting file data and running the function:Alternatively, here is a
docker-compose
configuration for your convenience in testing (from thedocker
folder (note - I was having permissions issues with thedocker-compose.yml
that already existed in thedocker
directory, but I presume y'all use it successfully, so this is derived from that, but not tested directly):If this
docker-compose.yml
configuration is used, make sure to run the generation of thesecrets
directory and associate files, before. This does not comprehensively test all available_FILE
additions, but should prove concept.