From 7a4ff48590608df7d271c98e1b67d5d85076e88f Mon Sep 17 00:00:00 2001 From: kisfenyo Date: Wed, 30 Sep 2026 18:05:48 +0200 Subject: [PATCH] wger: run the database migrations at start (R-738) wger's image runs `manage.py migrate` only when DJANGO_PERFORM_MIGRATIONS=True (entrypoint.sh). Without it, 2.6 -> 2.7 through the guarded Update on 9202 ended `done` and left 12 migrations unapplied: the web login answered 500 (no such column: core_userprofile.time_zone). With the switch, the same step on 9202 ran the migrations and the seeded weight entry read back. No image moves here; no box reporting to the hub runs wger. Evidence: felhom.eu/documentation/audits/more-night-apps-2026-09-30/box/wger/ Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS --- templates/wger/docker-compose.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/wger/docker-compose.yml b/templates/wger/docker-compose.yml index f02c78f..3933676 100644 --- a/templates/wger/docker-compose.yml +++ b/templates/wger/docker-compose.yml @@ -26,6 +26,9 @@ services: # https Origin with "CSRF verification failed" — nobody could sign in from a browser. - CSRF_TRUSTED_ORIGINS=https://${SUBDOMAIN}.${DOMAIN} - X_FORWARDED_PROTO_HEADER_SET=True + # R-738: the image runs `manage.py migrate` at start ONLY with this switch (entrypoint.sh). Without it an update + # that brings migrations leaves wger serving its front page over an unmigrated database (login 500). + - DJANGO_PERFORM_MIGRATIONS=True - DJANGO_DB_ENGINE=django.db.backends.sqlite3 - DJANGO_DB_DATABASE=/home/wger/db/database.sqlite - DJANGO_DB_USER=wger