Add support for Docker secrets #90
suhaskarnik
started this conversation in
Ideas
Replies: 2 comments 1 reply
|
Thanks @suhaskarnik I need to research a bit more on this since I wasn't familiar with it already. My initial thoughts:
I saw you branch, do you mind opening a PR here? |
0 replies
|
This logic does indeed kick in only if the DB is Postgres. In the original code, it uses Postgres if the DSN is populated, otherwise it picks sqlite. In the new branch, it checks for the presense of the POSTGRES_USER etc and if so, it uses those to construct the DSN. If those vars/secrets aren't available, the DSN doesn't get created, so the sqlite fallback will continue. I have now created the PR |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Currently, the package hardcodes the DSN in Docker Compose. The DSN includes the user, password and DB name. As this is sensitive information, I propose that we allow passing these values as separate env vars and as files. This is similar to the approach taken by the standard Postgres image, which allows POSTGRES_USER, POSTGRES_PASSWORD and POSTGRES_DB, each of which also has a _FILE variant.
I've written the code for this, and have pushed the code to my own fork of this repo. The branch is here. Tests are running fine, and it's linted as well.
Please let me know your thoughts
All reactions