diff --git a/wger/CHANGELOG.md b/wger/CHANGELOG.md index 7fb0a08e80..2bc19d1628 100644 --- a/wger/CHANGELOG.md +++ b/wger/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.6.4 (2026-09-05) + +- Fix the add-on failing to start with `ImproperlyConfigured: Set the DJANGO_DB_ENGINE environment variable`: wger 2.7 removed the implicit sqlite fallback from its settings, so the database is now declared explicitly through `DJANGO_DB_ENGINE` / `DJANGO_DB_DATABASE`, still pointing at the persistent `/data/database.sqlite` +- Replace the misleading "Unable to find Python settings containing database path" warning with an informational message, as wger no longer hardcodes that path + ## 2.6.3 (2026-08-01) - Version renamed from `2.6-dev-3`, which Home Assistant could not order and therefore could not reliably offer as an update: every number of the previous version is kept, as a section of its own. The addon itself and the upstream version it tracks are unchanged diff --git a/wger/Dockerfile b/wger/Dockerfile index 40c9c201cb..4c1d32ab56 100644 --- a/wger/Dockerfile +++ b/wger/Dockerfile @@ -34,6 +34,18 @@ ENV SYNC_EXERCISES_ON_STARTUP=True \ DJANGO_MEDIA_ROOT="/data/media" \ DJANGO_STATIC_ROOT="/data/static" +# wger 2.7 dropped the implicit sqlite fallback in settings/main.py, so the +# database has to be declared through the environment or Django aborts with +# "Set the DJANGO_DB_ENGINE environment variable". +# USER/PASSWORD/HOST/PORT are ignored by the sqlite backend; they are set +# because wger 2.6 read them without a default, so both base images boot. +ENV DJANGO_DB_ENGINE="django.db.backends.sqlite3" \ + DJANGO_DB_DATABASE="/data/database.sqlite" \ + DJANGO_DB_USER="" \ + DJANGO_DB_PASSWORD="" \ + DJANGO_DB_HOST="" \ + DJANGO_DB_PORT="5432" + USER root RUN echo "wger ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \ diff --git a/wger/config.yaml b/wger/config.yaml index 91230dc5a4..29edb4d739 100644 --- a/wger/config.yaml +++ b/wger/config.yaml @@ -23,5 +23,5 @@ schema: slug: wger udev: true url: https://github.com/alexbelgium/hassio-addons -version: "2.6.3" +version: "2.6.4" webui: "[PROTO:ssl]://[HOST]:[PORT:80]" diff --git a/wger/rootfs/etc/cont-init.d/90-run.sh b/wger/rootfs/etc/cont-init.d/90-run.sh index c4bef22433..a818fc39b9 100755 --- a/wger/rootfs/etc/cont-init.d/90-run.sh +++ b/wger/rootfs/etc/cont-init.d/90-run.sh @@ -62,7 +62,9 @@ if [ "${#SETTINGS_FILES[@]}" -gt 0 ]; then sed -i "s|/home/wger/db/database.sqlite|/data/database.sqlite|g" "$settings_file" done else - bashio::log.warning "Unable to find Python settings containing database path under /home, skipping rewrite" + # 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}" fi #####################