From 32cdf96c133fad8d1984a0d04bf8dc262e928ed7 Mon Sep 17 00:00:00 2001 From: librelad Date: Sun, 24 May 2026 18:58:48 +0100 Subject: [PATCH] fix(webui): re-apply tag processors after the WebUI compose template copy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit installLibrePortalImageWebUI copyFolder's the template docker-compose.yml (raw #LIBREPORTAL|TAG|VALUE placeholders) over the runtime one on every WebUI build — including rebuilds/updates. On a fresh install the following dockerInstallApp substitutes them, but on a rebuild (libreportal already installed) nothing did, so the at-rest compose kept raw placeholders and a plain 'docker compose' against it failed ("invalid boolean: HEALTHCHECK_DATA", etc.) — it only worked because up_app.sh self-heals at CLI start time. Re-run the tag processors (initializeAppVariables + dockerConfigSetupFileWithData, the same heal up_app.sh uses) right after the copy when libreportal is already installed, so the runtime compose is always fully substituted at rest. Co-Authored-By: Claude Opus 4.7 Signed-off-by: librelad --- scripts/webui/webui_install_image.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scripts/webui/webui_install_image.sh b/scripts/webui/webui_install_image.sh index 66c7067..5e5bbf6 100755 --- a/scripts/webui/webui_install_image.sh +++ b/scripts/webui/webui_install_image.sh @@ -11,6 +11,21 @@ installLibrePortalImageWebUI() reconcileWebuiDirOwnership + # copyFolder just restored the TEMPLATE docker-compose.yml, which carries raw + # #LIBREPORTAL|TAG|VALUE placeholders. On a fresh install the following + # dockerInstallApp (installLibrePortalAppWebUI) substitutes them; but on a + # REBUILD/update (libreportal already installed — this also runs via the WebUI + # deploy) nothing else does, leaving the at-rest compose unparseable by a plain + # `docker compose` (e.g. "invalid boolean: HEALTHCHECK_DATA"). Re-apply the tag + # processors here — the same self-heal up_app.sh uses — so the runtime compose + # is always fully substituted at rest, not just when started via the CLI. + if declare -F dockerConfigSetupFileWithData >/dev/null 2>&1 \ + && [[ "$(dockerCheckAppInstalled libreportal docker)" != "not_installed" ]]; then + initializeAppVariables libreportal >/dev/null 2>&1 || true + dockerConfigSetupFileWithData libreportal >/dev/null 2>&1 || true + checkSuccess "Re-applied LibrePortal WebUI compose tag substitutions" + fi + isNotice "Building libreportal-service image, this may take a while..." local result=$(runFileOp docker build -t libreportal-service -f $containers_dir/libreportal/Dockerfile $containers_dir/libreportal >/dev/null 2>&1) checkSuccess "Built LibrePortal WebUI Docker image"