Skip to content

feat(compose): docker secrets for postgres env#2166

Draft
benja1006 wants to merge 2 commits intoseerr-team:developfrom
benja1006:docker-env-var-files
Draft

feat(compose): docker secrets for postgres env#2166
benja1006 wants to merge 2 commits intoseerr-team:developfrom
benja1006:docker-env-var-files

Conversation

@benja1006
Copy link

@benja1006 benja1006 commented Nov 22, 2025

Description

Added support for using docker secrets to set the postgres username, password and database names

Screenshot (if UI-related)

To-Dos

  • Disclosed any use of AI (see our policy)
  • Successful build pnpm build
  • Translation keys pnpm i18n:extract
  • Database migration (if required)
  • Update documentation for new functionality

Issues Fixed or Closed

… parameters

added support for using docker secrets to set the postgres username, password and database names

re seerr-team#2144
@benja1006
Copy link
Author

I wanted to check in on the re-use of a the stringOrReadFileFromEnv() function. I had to modify it slightly to avoid returning a Buffer. To my knowledge, cert files shouldn't contain non-utf-8 encodable characters, so this shouldn't break anything.

Alternatively, I could create a duplicate function if that would be preferred. If this were the route taken, I would include the trim inside which would make the resultant code a little nicer. The trim is there to deal with newlines at the end of the file.

I'm also open to recommendations on how I should comment the example compose.posgres.yaml

@M0NsTeRRR
Copy link
Member

Hey @benja1006 :)

There’s a similar feature for API Key #2150 that aims to support systemd-credentials (which is similar to Docker secrets). We’ll work on the API key first and ensure compatibility with both Docker and systemd. After that, we can reuse the same logic for your PR here. Feel free to comment on this PR if you have any input to share! :)

@M0NsTeRRR M0NsTeRRR added the blocked This issue can't be solved for now label Dec 15, 2025
@M0NsTeRRR
Copy link
Member

Hey @benja1006, since #2150 has been inactive for a while, I’ll mark it as blocked. We can handle the work here instead let me know if that works for you.

Could you implement it along the lines of my comment here?

@benja1006
Copy link
Author

Hey @M0NsTeRRR I would be happy to take a stab at that. Should be a pretty easy adjustment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked This issue can't be solved for now

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for environment variables from files (Docker secrets)

2 participants