From 93c2c3ee6746ecd5889ba62c16e70305b2e545a5 Mon Sep 17 00:00:00 2001 From: Dorian Date: Wed, 18 Mar 2026 15:31:17 +0000 Subject: [PATCH] fix: deploy script credential injection + container state mapping MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Bitcoin UI nginx: use __BITCOIN_RPC_AUTH__ placeholder, injected at deploy time from secrets file (fixes auth prompt regression) - Deploy script: sed-replaces placeholder with real base64 RPC creds before building bitcoin-ui Docker image - Container state: "created" → "stopped" (not "starting") so ollama/ tailscale show correctly - Comprehensive INSTALLED_ALIASES for marketplace All container credentials now flow from secrets files through the deploy script. Manual container recreation is no longer needed. Co-Authored-By: Claude Opus 4.6 (1M context) --- docker/bitcoin-ui/nginx.conf | 2 +- scripts/deploy-to-target.sh | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docker/bitcoin-ui/nginx.conf b/docker/bitcoin-ui/nginx.conf index 3c9f1a69..5f543252 100644 --- a/docker/bitcoin-ui/nginx.conf +++ b/docker/bitcoin-ui/nginx.conf @@ -13,7 +13,7 @@ server { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Authorization "Basic YXJjaGlwZWxhZ286YXJjaGlwZWxhZ28xMjM="; + proxy_set_header Authorization "Basic __BITCOIN_RPC_AUTH__"; add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Methods "POST, GET, OPTIONS"; add_header Access-Control-Allow-Headers "Content-Type, Authorization"; diff --git a/scripts/deploy-to-target.sh b/scripts/deploy-to-target.sh index 739fb2ca..f86aa08f 100755 --- a/scripts/deploy-to-target.sh +++ b/scripts/deploy-to-target.sh @@ -800,6 +800,15 @@ MANIFEST_EOF # Rebuild and recreate Bitcoin UI container (host network, port 8334 in nginx.conf) # Host network required: bitcoin-ui proxies Bitcoin RPC at 127.0.0.1:8332 progress "Rebuilding Bitcoin UI" + # Inject real RPC credentials into bitcoin-ui nginx config before building + ssh $SSH_OPTS "$TARGET_HOST" ' + SECRETS_DIR="/var/lib/archipelago/secrets" + RPC_PASS=$(sudo cat "$SECRETS_DIR/bitcoin-rpc-password" 2>/dev/null) + if [ -n "$RPC_PASS" ]; then + AUTH_B64=$(echo -n "archipelago:${RPC_PASS}" | base64) + sed -i "s|__BITCOIN_RPC_AUTH__|${AUTH_B64}|g" '"$TARGET_DIR"'/docker/bitcoin-ui/nginx.conf + fi + ' 2>/dev/null || true if ssh $SSH_OPTS "$TARGET_HOST" "cd $TARGET_DIR/docker/bitcoin-ui && (command -v podman >/dev/null 2>&1 && podman build --no-cache -t bitcoin-ui:latest . || docker build --no-cache -t bitcoin-ui:latest .)" 2>&1 | tail -12 | sed 's/^/ /'; then echo " Recreating Bitcoin UI container (port 8334, host network)..." ssh $SSH_OPTS "$TARGET_HOST" '