couchdb-docker
couchdb-docker copied to clipboard
feat: Add ability to load secrets from files
Overview
Adds the ability to load secret values from files. These environment variables follow the existing environment variable names except with a _FILE suffix.
COUCHDB_ERLANG_COOKIE_FILECOUCHDB_SECRET_FILECOUCHDB_USER_FILECOUCHDB_PASSWORD_FILE
These environment variables are expected to be paths of projected secret values into the container.
These environment variables are only used if the existing environment variables are not provided IE if a user specifies COUCHDB_SECRET then COUCHDB_SECRET_FILE will be ignored.
The existing logic of hydrating the docker.ini file has been extracted to functions and re-used with the values loaded from the secret files.
Testing recommendations
TODO
GitHub issue number
Fixes #256
Related Pull Requests
Checklist
- [ ] Code is written and works correctly;
- [ ] Changes are covered by tests;
- [ ] Documentation reflects the changes;