fix: container stability, OnlyOffice removal, node bootstrapping, UI fixes
Container orchestration: - Add --network-alias to all archy-net containers (fixes Podman DNS) - Fix bitcoin-knots health check: expand $BITCOIN_RPC_PASS at creation - Increase bitcoin-knots memory limit to 4g, reduce dbcache to 2048 - Enable podman-restart.service in ISO for auto-start on boot - Fix UI container Dockerfiles: ENTRYPOINT [], user root for rootless App changes: - Remove OnlyOffice (incompatible with rootless Podman) - Replace with CryptPad reference (single-process, e2e encrypted) - Fix NPM port mapping: 8181 → 81 - Fix OnlyOffice port mapping: 8044 → 9980 (now CryptPad: 3003) AIUI & proxy: - Add MODEL_MAP to claude-api-proxy (ISO + deploy) - Map legacy model IDs (claude-haiku-4.5 → claude-haiku-4-5-20251001) Kiosk: - Move chromium-kiosk data dir to /var/lib/archipelago (data partition) - Remove --metrics-recording-only (contradicted --disable-metrics) Node bootstrapping: - Add bootstrap-switchover.sh for live node updates - ElectrumX UI improvements and nginx proxy fixes - LND UI nginx config updates Backend: - Bitcoin health check uses .cookie auth (no plaintext creds) - ElectrumX status endpoint improvements - Network alias flag in install.rs for DNS reliability Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -300,6 +300,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
plymouth \
|
||||
plymouth-themes \
|
||||
zstd \
|
||||
socat \
|
||||
python3 \
|
||||
apache2-utils \
|
||||
&& apt-get clean \
|
||||
@@ -1250,6 +1251,7 @@ HiddenServicePort 80 127.0.0.1:80
|
||||
|
||||
HiddenServiceDir $TOR_DIR/hidden_service_bitcoin
|
||||
HiddenServicePort 8333 127.0.0.1:8333
|
||||
HiddenServicePort 8332 127.0.0.1:8332
|
||||
|
||||
HiddenServiceDir $TOR_DIR/hidden_service_electrumx
|
||||
HiddenServicePort 50001 127.0.0.1:50001
|
||||
@@ -1475,6 +1477,41 @@ FBCSERVICE
|
||||
fi
|
||||
fi
|
||||
|
||||
# Bootstrap node config — new installs use this Bitcoin node during IBD
|
||||
# so ElectrumX/LND/BTCPay/Mempool work immediately while local chain syncs
|
||||
# Tries LAN first (fast), falls back to Tor (works from anywhere)
|
||||
BOOTSTRAP_RPC_PASS=""
|
||||
BOOTSTRAP_ONION=""
|
||||
if [ -f /var/lib/archipelago/secrets/bitcoin-rpc-password ]; then
|
||||
BOOTSTRAP_RPC_PASS=$(cat /var/lib/archipelago/secrets/bitcoin-rpc-password 2>/dev/null)
|
||||
fi
|
||||
if [ -f /var/lib/archipelago/tor-hostnames/bitcoin ]; then
|
||||
BOOTSTRAP_ONION=$(cat /var/lib/archipelago/tor-hostnames/bitcoin 2>/dev/null)
|
||||
fi
|
||||
if [ -n "$BOOTSTRAP_RPC_PASS" ]; then
|
||||
DEV_IP="${DEV_SERVER:-192.168.1.228}"
|
||||
cat > "$ARCH_DIR/bootstrap.conf" <<BSTRAP
|
||||
# Bootstrap Bitcoin node — used during Initial Block Download
|
||||
# Services connect here until the local node is fully synced
|
||||
# First-boot tries LAN, then Tor (works from any network)
|
||||
BOOTSTRAP_LAN_HOST=${DEV_IP}
|
||||
BOOTSTRAP_ONION=${BOOTSTRAP_ONION}
|
||||
BOOTSTRAP_RPC_USER=archipelago
|
||||
BOOTSTRAP_RPC_PASS=${BOOTSTRAP_RPC_PASS}
|
||||
BSTRAP
|
||||
chmod 600 "$ARCH_DIR/bootstrap.conf"
|
||||
echo " ✅ Bootstrap node config embedded (LAN: ${DEV_IP}, Tor: ${BOOTSTRAP_ONION:-none})"
|
||||
else
|
||||
echo " ⚠ No bootstrap config — no Bitcoin RPC password found on build host"
|
||||
fi
|
||||
|
||||
# Bundle bootstrap switchover script + systemd timer
|
||||
if [ -f "$SCRIPT_DIR/../scripts/bootstrap-switchover.sh" ]; then
|
||||
cp "$SCRIPT_DIR/../scripts/bootstrap-switchover.sh" "$ARCH_DIR/scripts/"
|
||||
chmod +x "$ARCH_DIR/scripts/bootstrap-switchover.sh"
|
||||
echo " ✅ Bundled bootstrap switchover script"
|
||||
fi
|
||||
|
||||
# Bundle E2E test script for post-install validation
|
||||
if [ -f "$SCRIPT_DIR/../scripts/run-e2e-tests.sh" ]; then
|
||||
cp "$SCRIPT_DIR/../scripts/run-e2e-tests.sh" "$ARCH_DIR/scripts/"
|
||||
@@ -2598,7 +2635,46 @@ chown -R 1000:1000 /mnt/target/home/archipelago/.config 2>/dev/null || true
|
||||
mkdir -p /mnt/target/etc/tmpfiles.d
|
||||
echo 'd /run/user/1000 0700 archipelago archipelago -' > /mnt/target/etc/tmpfiles.d/archipelago-runtime.conf
|
||||
|
||||
# Bootstrap switchover — checks when local Bitcoin finishes IBD and switches services
|
||||
cat > /mnt/target/etc/systemd/system/archipelago-bootstrap-switchover.service <<'BSSERVICE'
|
||||
[Unit]
|
||||
Description=Switch Bitcoin-dependent services from bootstrap to local node
|
||||
After=archipelago-first-boot-containers.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=archipelago
|
||||
ExecStart=/opt/archipelago/scripts/bootstrap-switchover.sh
|
||||
BSSERVICE
|
||||
|
||||
cat > /mnt/target/etc/systemd/system/archipelago-bootstrap-switchover.timer <<'BSTIMER'
|
||||
[Unit]
|
||||
Description=Periodically check if local Bitcoin is synced and switch from bootstrap
|
||||
|
||||
[Timer]
|
||||
OnBootSec=10min
|
||||
OnUnitActiveSec=5min
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
BSTIMER
|
||||
|
||||
# Copy bootstrap config to install target
|
||||
if [ -f "$BOOT_MEDIA/archipelago/bootstrap.conf" ]; then
|
||||
cp "$BOOT_MEDIA/archipelago/bootstrap.conf" /mnt/target/opt/archipelago/bootstrap.conf
|
||||
chmod 600 /mnt/target/opt/archipelago/bootstrap.conf
|
||||
chown root:root /mnt/target/opt/archipelago/bootstrap.conf
|
||||
fi
|
||||
|
||||
# Copy bootstrap switchover script
|
||||
if [ -f "$BOOT_MEDIA/archipelago/scripts/bootstrap-switchover.sh" ]; then
|
||||
cp "$BOOT_MEDIA/archipelago/scripts/bootstrap-switchover.sh" /mnt/target/opt/archipelago/scripts/
|
||||
chmod +x /mnt/target/opt/archipelago/scripts/bootstrap-switchover.sh
|
||||
fi
|
||||
|
||||
# Enable services
|
||||
chroot /mnt/target systemctl enable archipelago-bootstrap-switchover.timer 2>/dev/null || true
|
||||
chroot /mnt/target systemctl enable archipelago.service 2>/dev/null || true
|
||||
chroot /mnt/target systemctl enable nginx.service 2>/dev/null || true
|
||||
chroot /mnt/target systemctl enable archipelago-load-images.service 2>/dev/null || true
|
||||
|
||||
Reference in New Issue
Block a user