From b2ed27dcfbf74eef2cc2995bc12d1e34f94fed19 Mon Sep 17 00:00:00 2001 From: archipelago Date: Sun, 2 Aug 2026 19:56:52 -0400 Subject: [PATCH] fix(bitcoin-ui): send no-cache for index.html; pin the rebuilt image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two things needed for the new UI to actually reach users. The rendered nginx.conf served index.html with only ETag/Last-Modified and no Cache-Control, so browsers applied heuristic caching to it. Confirmed on archi-dev-box: after rebuilding and recreating the container, :8334 and /app/bitcoin-ui/ both served the new markup immediately, but the app iframe in the main UI kept showing the previous UI until a hard refresh. docker/lnd-ui/nginx.conf has always carried this header, which is why only bitcoin-ui showed the stale copy. Using "no-cache" (revalidate) rather than "no-store" keeps the ETag doing its job when nothing has changed. Validated by mounting the rendered config into a throwaway container from the built image and running nginx -t. (An earlier attempt to test it inside the running container was meaningless — conf.d/default.conf is a read-only bind mount, so the copy failed and nginx -t just re-checked the original.) The 8 container::bitcoin_ui tests still pass; their assertions cover the placeholder, the 8332 proxy_pass and the listen directive, none of which this touches. BITCOIN_UI_IMAGE was still pinned to 1.7.84-alpha, so a fresh install would pull a bitcoin-ui from many releases ago regardless of what the OTA ships — first-boot-containers.sh tries the registry image before building from source. Bumped to 1.7.119-alpha, matching the current release, and the image is pushed under that tag. Co-Authored-By: Claude Opus 5 (1M context) --- .../src/container/bitcoin_ui_nginx.conf.template | 11 ++++++++++- scripts/image-versions.sh | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/core/archipelago/src/container/bitcoin_ui_nginx.conf.template b/core/archipelago/src/container/bitcoin_ui_nginx.conf.template index 0a5d5173..6e7e2bdb 100644 --- a/core/archipelago/src/container/bitcoin_ui_nginx.conf.template +++ b/core/archipelago/src/container/bitcoin_ui_nginx.conf.template @@ -63,5 +63,14 @@ server { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; add_header Cache-Control "no-store"; } - location / { try_files $uri $uri/ /index.html; } + # no-cache so a rebuilt image is actually seen. Without this nginx sends + # only ETag/Last-Modified for index.html, and browsers apply heuristic + # caching to it — so an OTA that ships a new bitcoin-ui kept rendering the + # previous UI until the user hard-refreshed. docker/lnd-ui/nginx.conf has + # carried the same header for this reason. "no-cache" (revalidate), not + # "no-store", so the ETag still saves the transfer when nothing changed. + location / { + add_header Cache-Control "no-cache"; + try_files $uri $uri/ /index.html; + } } diff --git a/scripts/image-versions.sh b/scripts/image-versions.sh index 83d55076..3d4e92e4 100644 --- a/scripts/image-versions.sh +++ b/scripts/image-versions.sh @@ -117,7 +117,7 @@ PENPOT_EXPORTER_IMAGE="$ARCHY_REGISTRY/penpot-exporter:2.4" PENPOT_FRONTEND_IMAGE="$ARCHY_REGISTRY/penpot-frontend:2.4" # Custom UI containers (built from docker/ dirs, pushed to registry) -BITCOIN_UI_IMAGE="$ARCHY_REGISTRY/bitcoin-ui:1.7.84-alpha" +BITCOIN_UI_IMAGE="$ARCHY_REGISTRY/bitcoin-ui:1.7.119-alpha" LND_UI_IMAGE="$ARCHY_REGISTRY/lnd-ui:latest" ELECTRS_UI_IMAGE="$ARCHY_REGISTRY/electrs-ui:latest"