mirror of
https://github.com/plankanban/planka.git
synced 2026-02-24 19:08:59 +03:00
[PR #1132] [MERGED] feat: Support loading passwords from docker secrets #1198
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/plankanban/planka/pull/1132
Author: @iosabi
Created: 5/15/2025
Status: ✅ Merged
Merged: 5/15/2025
Merged by: @meltyshev
Base:
master← Head:docker_secrets📝 Commits (2)
63c073efeat: Support loading passwords from docker secretsb8c62d2chore: Prettify env variables, add more secrets📊 Changes
4 files changed (+96 additions, -16 deletions)
View changed files
📝
docker-compose-dev.yml(+10 -5)📝
docker-compose.yml(+28 -5)📝
server/.env.sample(+10 -5)📝
server/start.sh(+48 -1)📄 Description
Docker secrets are exposed as files in
/run/secrets/inside the container instead of as environment variables. To support deployments where the passwords are stored in secrets, this patch adds support for loading theSMTP_PASSWORD,SECRET_KEYand the database password from files, using the__FILEsuffix convention found in many docker images.The database password is part of the
DATABASE_URLenvironment variable, if a password is used at all. To support injecting the password into the DATABASE_URL without having to use the whole URL as the secret, thestart.shreplaces the string${DATABASE_PASSWORD}in theDATABASE_URLenvironment variable by the contents of theDATABASE_PASSWORDvariable, which can now also be loaded from the corresponding file passed inDATABASE_PASSWORD__FILE.These changes are backwards compatible since they only load the
__FILEsuffix version if the original variable was not set the__FILEone is set.Added comments in docker-compose.yml with examples for discoverability of the feature. Tested this on top of 2.0.0-rc.2.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.