couchdb-docker icon indicating copy to clipboard operation
couchdb-docker copied to clipboard

feat: Add ability to load secrets from files

Open bryopsida opened this issue 10 months ago • 0 comments

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_FILE
  • COUCHDB_SECRET_FILE
  • COUCHDB_USER_FILE
  • COUCHDB_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;

bryopsida avatar Feb 02 '25 14:02 bryopsida