fix(ui): stabilize system status metrics

This commit is contained in:
archipelago
2026-05-18 11:47:12 -04:00
parent 92c578d3d9
commit 32902d3891
9 changed files with 554 additions and 69 deletions

View File

@@ -508,13 +508,13 @@ LOW_MEM=false
mem_limit() {
case "$1" in
bitcoin-knots) $LOW_MEM && echo "2g" || echo "4g";;
bitcoin|bitcoin-core|bitcoin-knots) $LOW_MEM && echo "4g" || echo "8g";;
cryptpad) echo "512m";;
ollama) $LOW_MEM && echo "1g" || echo "4g";;
lnd) echo "512m";;
electrumx) echo "1g";;
electrumx|mempool-electrs|electrs) echo "4g";;
nextcloud) echo "1g";;
btcpay-server) echo "1g";;
btcpay-server|btcpayserver) echo "1g";;
homeassistant) echo "512m";;
fedimint) echo "512m";;
fedimint-gateway) echo "512m";;
@@ -588,7 +588,11 @@ if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -qE 'bitcoin-knots|arch
[ -z "$DISK_GB" ] && DISK_GB=$(df --output=size -BG / 2>/dev/null | tail -1 | tr -dc '0-9')
if [ "${DISK_GB:-0}" -lt 1000 ]; then
BTC_EXTRA_ARGS="-prune=550"
BTC_DBCACHE=2048
if [ "$LOW_MEM" = "true" ]; then
BTC_DBCACHE=2048
else
BTC_DBCACHE=4096
fi
log " Small disk (${DISK_GB}GB) — enabling pruning"
else
BTC_EXTRA_ARGS="-txindex=1"