From c0382dfa4fac60bbfa395ab8b23105ea1222a6d5 Mon Sep 17 00:00:00 2001 From: librelad Date: Mon, 6 Jul 2026 21:44:16 +0100 Subject: [PATCH] perf(install): don't build the WebUI image twice on a fresh install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit startPreInstall called installLibrePortalImageWebUI standalone AND then installLibrePortalAppWebUI, whose app-install step 1 builds the same image again — so a fresh install built libreportal-service twice back-to-back (2nd mostly Docker-cache hits, but a redundant copyFolder + "this may take a while" block). The standalone call only matters on a rebuild where the app-install path SKIPS (libreportal already in the DB). Gate it on exactly that: build standalone only when libreportal is already installed. Net: one build in both cases (fresh → via app install; reinstall → standalone). Signed-off-by: librelad Co-Authored-By: Claude Opus 4.8 (1M context) --- scripts/start/start_preinstall.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/start/start_preinstall.sh b/scripts/start/start_preinstall.sh index f5b6794..31f6d68 100755 --- a/scripts/start/start_preinstall.sh +++ b/scripts/start/start_preinstall.sh @@ -47,7 +47,13 @@ startPreInstall() installSSLCertificate; installSwapfile; - installLibrePortalImageWebUI; + # installLibrePortalAppWebUI builds the WebUI image as its step 1 on a fresh + # install (libreportal not yet in the DB). Only build standalone here when + # that path will be SKIPPED (libreportal already installed — a rebuild), so a + # fresh install doesn't build the same image twice. + if [[ "$(dockerCheckAppInstalled libreportal docker)" != "not_installed" ]]; then + installLibrePortalImageWebUI; + fi installLibrePortalAppWebUI; installLibrePortalWebUITaskService;