Implement Bitcoin and LND UI in Docker setup and enhance startup script
- Added Docker services for Bitcoin Core UI and LND UI, providing web interfaces for both applications. - Updated the startup script to improve image pulling process and service readiness checks with retries. - Modified the app view to open the Bitcoin Core UI in a new tab instead of routing through the app. - Removed the Bitcoin Core Vue component as it is no longer needed, streamlining the UI structure. - Excluded backend services from the app listing to improve clarity in the Docker package scanner.
This commit is contained in:
@@ -42,32 +42,13 @@ if ! docker images | grep -q "lncm/bitcoind\|homeassistant/home-assistant\|grafa
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$FIRST_RUN" = true ]; then
|
||||
if [ "$FIRST_RUN" = "true" ]; then
|
||||
echo "📦 Pulling Docker images (this will take a while)..."
|
||||
echo " 💡 Tip: You can monitor progress in Docker Desktop"
|
||||
echo ""
|
||||
|
||||
# Pull all images quietly
|
||||
$COMPOSE_CMD pull --quiet &
|
||||
PULL_PID=$!
|
||||
|
||||
# Show a simple spinner while pulling
|
||||
spin='-\|/'
|
||||
i=0
|
||||
echo -n " Downloading images... "
|
||||
while kill -0 $PULL_PID 2>/dev/null; do
|
||||
i=$(( (i+1) %4 ))
|
||||
printf "\r Downloading images... ${spin:$i:1}"
|
||||
sleep 0.2
|
||||
done
|
||||
|
||||
wait $PULL_PID
|
||||
PULL_EXIT=$?
|
||||
printf "\r Downloading images... ✅\n"
|
||||
|
||||
if [ $PULL_EXIT -ne 0 ]; then
|
||||
echo "❌ Failed to pull some images. Continuing anyway..."
|
||||
fi
|
||||
# Pull quietly to avoid terminal flooding
|
||||
$COMPOSE_CMD pull --quiet
|
||||
|
||||
echo ""
|
||||
echo "✅ All images downloaded!"
|
||||
@@ -81,30 +62,56 @@ echo "🚀 Starting all containers..."
|
||||
$COMPOSE_CMD up -d
|
||||
|
||||
echo ""
|
||||
echo "⏳ Waiting for services to be ready..."
|
||||
sleep 5
|
||||
|
||||
# Check health of key services
|
||||
echo "⏳ Waiting for services to initialize..."
|
||||
echo ""
|
||||
echo "🔍 Checking service health..."
|
||||
|
||||
# Give containers time to start
|
||||
sleep 3
|
||||
|
||||
# Check health of key services (non-blocking, just for info)
|
||||
echo "🔍 Checking service health (this may take 30-60 seconds)..."
|
||||
READY_COUNT=0
|
||||
TOTAL_SERVICES=13
|
||||
MAX_ATTEMPTS=30
|
||||
ATTEMPT=0
|
||||
|
||||
check_service() {
|
||||
local name=$1
|
||||
local url=$2
|
||||
if curl -sf "$url" > /dev/null 2>&1; then
|
||||
echo " ✅ $name is ready"
|
||||
((READY_COUNT++))
|
||||
return 0
|
||||
else
|
||||
echo " ⏳ $name is starting..."
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
check_service "Grafana" "http://localhost:3000"
|
||||
check_service "SearXNG" "http://localhost:8082"
|
||||
check_service "Endurain" "http://localhost:8084"
|
||||
check_service "MorphOS" "http://localhost:8081"
|
||||
# Check services with retries
|
||||
while [ $ATTEMPT -lt $MAX_ATTEMPTS ]; do
|
||||
READY_COUNT=0
|
||||
|
||||
check_service "Grafana" "http://localhost:3000" && ((READY_COUNT++)) || true
|
||||
check_service "SearXNG" "http://localhost:8082" && ((READY_COUNT++)) || true
|
||||
check_service "Endurain" "http://localhost:8084" && ((READY_COUNT++)) || true
|
||||
check_service "MorphOS" "http://localhost:8081" && ((READY_COUNT++)) || true
|
||||
|
||||
if [ $READY_COUNT -ge 2 ]; then
|
||||
echo " ✅ Core services are ready!"
|
||||
break
|
||||
fi
|
||||
|
||||
if [ $ATTEMPT -eq 0 ]; then
|
||||
echo " ⏳ Services are starting (this is normal)..."
|
||||
fi
|
||||
|
||||
sleep 2
|
||||
((ATTEMPT++))
|
||||
done
|
||||
|
||||
if [ $READY_COUNT -lt 2 ]; then
|
||||
echo ""
|
||||
echo " ℹ️ Some services are still starting (this is normal)"
|
||||
echo " 💡 They will be available shortly. Check with: docker compose ps"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "📊 Container Status:"
|
||||
@@ -114,7 +121,8 @@ echo ""
|
||||
echo "🌐 Apps are available at:"
|
||||
echo ""
|
||||
echo " 💰 Bitcoin & Lightning:"
|
||||
echo " • Bitcoin Core (regtest): RPC at localhost:18443"
|
||||
echo " • Bitcoin Core UI: http://localhost:18445"
|
||||
echo " • Bitcoin Core RPC: localhost:18443"
|
||||
echo " • Lightning (LND REST): http://localhost:8080"
|
||||
echo " • BTCPay Server: http://localhost:14142"
|
||||
echo " • Mempool Explorer: http://localhost:4080"
|
||||
|
||||
Reference in New Issue
Block a user