fix: prevent My Apps crash when installing apps + add filebrowser to demo
The My Apps page went blank after installing apps because pkg['static-files'].icon was accessed without optional chaining on dynamically installed packages that lack the static-files property. - Make static-files optional in PackageDataEntry type - Add defensive ?.icon access with fallback in Apps.vue and AppDetails.vue - Add filebrowser to mock backend staticDevApps (enables Cloud page in demo) - Expand portMappings and marketplaceMetadata for all marketplace apps - installPackage now uses staticApp() format for consistent data shape Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -162,10 +162,36 @@ fi
|
||||
if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -qE '^lnd$'; then
|
||||
log "Creating LND..."
|
||||
mkdir -p /var/lib/archipelago/lnd
|
||||
# Create lnd.conf so LND auto-connects to Bitcoin Knots via archy-net
|
||||
if [ ! -f /var/lib/archipelago/lnd/lnd.conf ]; then
|
||||
cat > /var/lib/archipelago/lnd/lnd.conf <<'LNDCONF'
|
||||
[Application Options]
|
||||
listen=0.0.0.0:9735
|
||||
rpclisten=0.0.0.0:10009
|
||||
restlisten=0.0.0.0:8080
|
||||
debuglevel=info
|
||||
noseedbackup=true
|
||||
tor.active=false
|
||||
|
||||
[Bitcoin]
|
||||
bitcoin.mainnet=true
|
||||
bitcoin.node=bitcoind
|
||||
|
||||
[Bitcoind]
|
||||
bitcoind.rpchost=bitcoin-knots:8332
|
||||
bitcoind.rpcuser=archipelago
|
||||
bitcoind.rpcpass=archipelago123
|
||||
bitcoind.rpcpolling=true
|
||||
bitcoind.estimatemode=ECONOMICAL
|
||||
|
||||
[autopilot]
|
||||
autopilot.active=false
|
||||
LNDCONF
|
||||
log "LND config created (archy-net → bitcoin-knots:8332, rpcpolling)"
|
||||
fi
|
||||
$DOCKER run -d --name lnd --restart unless-stopped --network archy-net \
|
||||
-p 9735:9735 -p 10009:10009 -p 8080:8080 \
|
||||
-v /var/lib/archipelago/lnd:/root/.lnd \
|
||||
-e BITCOIN_ACTIVE=1 \
|
||||
docker.io/lightninglabs/lnd:v0.18.4-beta 2>>"$LOG" || true
|
||||
fi
|
||||
|
||||
@@ -475,4 +501,38 @@ for ui in bitcoin-ui lnd-ui; do
|
||||
fi
|
||||
done
|
||||
|
||||
# 10. Initialize backend data directories
|
||||
# tor-config: backend stores tor service configs here (writable by archipelago user)
|
||||
mkdir -p /var/lib/archipelago/tor-config
|
||||
SERVICES_JSON=/var/lib/archipelago/tor-config/services.json
|
||||
if [ ! -f "$SERVICES_JSON" ]; then
|
||||
cat > "$SERVICES_JSON" <<'SJSON'
|
||||
{"services":[
|
||||
{"name":"archipelago","local_port":80,"enabled":true},
|
||||
{"name":"lnd","local_port":8081,"enabled":true},
|
||||
{"name":"btcpay","local_port":23000,"enabled":true},
|
||||
{"name":"mempool","local_port":4080,"enabled":true},
|
||||
{"name":"fedimint","local_port":8175,"enabled":true}
|
||||
]}
|
||||
SJSON
|
||||
log "Created initial tor-config/services.json"
|
||||
fi
|
||||
|
||||
# identities: backend identity manager stores DIDs here
|
||||
mkdir -p /var/lib/archipelago/identities
|
||||
|
||||
# Ensure archipelago user can write to these directories
|
||||
chown -R 1000:1000 /var/lib/archipelago/tor-config /var/lib/archipelago/identities 2>/dev/null || true
|
||||
|
||||
# 11. Post-boot validation
|
||||
log "Validating container creation..."
|
||||
TOTAL=0; RUNNING=0
|
||||
for c in bitcoin-knots lnd btcpay-server fedimint homeassistant grafana uptime-kuma; do
|
||||
TOTAL=$((TOTAL + 1))
|
||||
if $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q "$c"; then
|
||||
RUNNING=$((RUNNING + 1))
|
||||
fi
|
||||
done
|
||||
log "Post-boot validation: $RUNNING/$TOTAL core containers running"
|
||||
|
||||
log "First-boot container creation complete"
|
||||
|
||||
Reference in New Issue
Block a user