From acfa7ec0fac916fd83a0c1df25d1fdcc10157b8f Mon Sep 17 00:00:00 2001 From: alexbelgium Date: Sat, 5 Sep 2026 06:16:32 +0200 Subject: [PATCH] fix(wger): stop the startup log from naming one database source wger reads PS_DATABASE_URI before the DJANGO_DB_* variables (settings/main.py on both 2.6 and 2.7), so a user who sets it through env_vars gets a database the DJANGO_DB_* defaults have no part in. The informational line asserted DJANGO_DB_DATABASE unconditionally and printed its value; it now names no single variable and logs no value, since PS_DATABASE_URI carries credentials. Co-Authored-By: Claude Opus 5 --- wger/rootfs/etc/cont-init.d/90-run.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wger/rootfs/etc/cont-init.d/90-run.sh b/wger/rootfs/etc/cont-init.d/90-run.sh index a818fc39b9..17c2e25619 100755 --- a/wger/rootfs/etc/cont-init.d/90-run.sh +++ b/wger/rootfs/etc/cont-init.d/90-run.sh @@ -63,8 +63,11 @@ if [ "${#SETTINGS_FILES[@]}" -gt 0 ]; then done else # Expected on wger >= 2.7: the settings no longer hardcode a database path, - # it is taken from DJANGO_DB_DATABASE instead (set in the Dockerfile) - bashio::log.info "Settings do not hardcode a database path, using DJANGO_DB_DATABASE=${DJANGO_DB_DATABASE:-/data/database.sqlite}" + # it comes from the environment instead. Which variable wins is decided by + # wger, not here: PS_DATABASE_URI takes precedence over the DJANGO_DB_* + # defaults set in the Dockerfile, so no single one is named, and no value + # is logged (PS_DATABASE_URI carries credentials). + bashio::log.info "Settings do not hardcode a database path, the database is taken from the environment" fi #####################