From e6e41f97dd0ea5fde5dc2fcd03520e95a4c4d1c7 Mon Sep 17 00:00:00 2001 From: Jan Dobes Date: Tue, 8 Sep 2026 14:17:38 +0200 Subject: [PATCH] fix: prefer clowder config over env for postgresql vars helps in environments with many conflicting env variables that would break the application otherwise --- common/config.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/config.py b/common/config.py index 1f2250f87..0b2901858 100644 --- a/common/config.py +++ b/common/config.py @@ -197,11 +197,11 @@ def clowder(self): # pylint: disable=too-many-statements,too-many-branches self.private_port = self._cfg.privatePort self.prometheus_port = self._cfg.metricsPort - self.db_name = os.getenv("POSTGRES_DB", self._cfg.database.name) - self.db_user = os.getenv("POSTGRES_USER", self._cfg.database.username) - self.db_pass = os.getenv("POSTGRES_PASSWORD", self._cfg.database.password) - self.db_host = os.getenv("POSTGRES_HOST", self._cfg.database.hostname) - self.db_port = int(os.getenv("POSTGRES_PORT", self._cfg.database.port)) + self.db_name = self._cfg.database.name + self.db_user = self._cfg.database.username + self.db_pass = self._cfg.database.password + self.db_host = self._cfg.database.hostname + self.db_port = int(self._cfg.database.port) self.db_ssl_mode = self._cfg.database.sslMode or "prefer" self.db_ssl_root_cert_path = self._cfg.rds_ca() if self._cfg.database.rdsCa else "/opt/rds-ca/rds-cacert"