Skip to content

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! :)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for environment variables from files (Docker secrets)

2 participants