Enhance Docker image pulling process and remove Bitcoin Core UI

- Improved the Docker image pulling process in the startup script with a spinner for better user feedback.
- Added a tip for monitoring progress in Docker Desktop.
- Removed the Bitcoin Core HTML UI file as it is no longer needed; replaced with connection info alert in the app view.
- Updated the app view to provide direct connection details for Bitcoin Core instead of opening a separate page.
This commit is contained in:
Dorian
2026-01-27 23:25:29 +00:00
parent 30ed48ad1b
commit 36233377d9
4 changed files with 209 additions and 418 deletions

View File

@@ -0,0 +1,184 @@
# Bitcoin Core Launch Fix + Quiet Docker Downloads
## Issues Fixed
### 1. Bitcoin Core "Launch" Confusion
**Problem**: Bitcoin Core is a **headless node** with no web interface. It only exposes an RPC API on port 18443.
**Solution**: Changed the launch button to show connection details instead of trying to open a non-existent web UI.
### 2. Noisy Docker Downloads
**Problem**: First-run Docker image downloads were extremely verbose, showing detailed progress for each of 13+ images.
**Solution**: Made downloads quiet with a simple spinner. Users can still monitor progress in Docker Desktop if needed.
### 3. Backend WebSocket Disconnects
**Not actually a problem**: The logs show the backend is working fine. WebSocket disconnects happen naturally when you refresh the page. The backend reconnects automatically.
## What Changed
### `/Users/dorian/Projects/archy/neode-ui/src/views/Apps.vue`
**Before**: Tried to open `/bitcoin-core.html` in a new tab
**After**: Shows an alert with RPC connection details:
```
✅ Bitcoin Core is running!
🔗 RPC Endpoint: http://localhost:18443
👤 User: bitcoin
🔑 Password: bitcoinpass
💡 Use bitcoin-cli or an RPC client to interact.
📊 View blockchain data in Mempool: http://localhost:4080
```
### `/Users/dorian/Projects/archy/start-docker-apps.sh`
**Before**: Verbose output showing every image download
**After**: Quiet mode with spinner:
```
📦 Pulling Docker images (this will take a while)...
💡 Tip: You can monitor progress in Docker Desktop
Downloading images... ✅
✅ All images downloaded!
```
### Deleted: `/Users/dorian/Projects/archy/neode-ui/public/bitcoin-core.html`
Removed because Bitcoin Core doesn't have a web UI.
## How Bitcoin Core Works Now
1. **Status**: Shows "Running" in My Apps
2. **Start/Stop**: Works via the action buttons
3. **Launch**: Shows connection info popup (can't launch a headless node)
4. **Access**: Use bitcoin-cli or connect via RPC at `localhost:18443`
5. **Blockchain Explorer**: Use Mempool at `http://localhost:4080` (once you start it)
## RPC Usage Examples
### Using bitcoin-cli (from within container)
```bash
docker exec -it archy-bitcoin bitcoin-cli -regtest -rpcuser=bitcoin -rpcpassword=bitcoinpass getblockchaininfo
```
### Using curl (from host)
```bash
curl -u bitcoin:bitcoinpass \
-X POST http://localhost:18443 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"1.0","id":"test","method":"getblockchaininfo","params":[]}'
```
### Using a GUI wallet/tool
Configure any Bitcoin wallet or tool to connect to:
- **Host**: localhost
- **Port**: 18443
- **Network**: regtest
- **RPC User**: bitcoin
- **RPC Password**: bitcoinpass
## About Regtest Mode
Bitcoin Core is running in **regtest** (regression test) mode:
- ✅ No blockchain sync required (instant start)
- ✅ Full Bitcoin functionality
- ✅ Create blocks on demand
- ✅ Perfect for development/testing
- ❌ Not connected to mainnet/testnet
### Generate test blocks
```bash
docker exec -it archy-bitcoin bitcoin-cli -regtest -rpcuser=bitcoin -rpcpassword=bitcoinpass generatetoaddress 101 <your-address>
```
## Understanding "Headless" Apps
Some apps in Archipelago don't have web UIs:
| App | Type | Access |
|-----|------|--------|
| Bitcoin Core | Headless | RPC only (port 18443) |
| LND | Headless + API | gRPC/REST API (port 8080) |
| BTCPay Server | Web UI | http://localhost:14142 ✅ |
| Mempool | Web UI | http://localhost:4080 ✅ |
| Home Assistant | Web UI | http://localhost:8123 ✅ |
| Grafana | Web UI | http://localhost:3000 ✅ |
For headless apps, the "Launch" button will show connection info instead of opening a browser.
## Backend Status (It's Fine!)
The WebSocket errors you saw are **normal behavior**:
1. ✅ Backend is running on port 5959
2. ✅ Scanning Docker containers every 5 seconds
3. ✅ Detecting Bitcoin Core correctly
4. ✅ WebSocket reconnects after page refresh
The log shows:
```
[INFO] Detected container: Bitcoin Core (running)
[DEBUG] Data model updated to revision 25
[INFO] WebSocket /ws/db connected
```
Everything is working as expected!
## Next Steps
### To Start Mempool Explorer (for Bitcoin blockchain viewing)
```bash
docker compose up -d mempool-web mempool-api
```
### To Start Other Apps
```bash
docker compose up -d btcpay # BTCPay Server
docker compose up -d lnd # Lightning Network
docker compose up -d grafana # Metrics dashboard
docker compose up -d homeassistant # Home automation
```
### To See All Running Apps
```bash
docker compose ps
```
### To Stop Everything
```bash
./stop-docker-apps.sh
# or
docker compose down
```
## Architecture Clarification
```
User clicks "Launch" on Bitcoin Core
Apps.vue checks app ID
if (id === 'bitcoin')
Show alert with RPC connection details
User can use bitcoin-cli, curl, or GUI wallet to connect
```
For apps with web UIs (BTCPay, Mempool, Grafana):
```
User clicks "Launch"
Apps.vue gets lanAddress from package
window.open(lanAddress, '_blank')
Opens app in new browser tab ✅
```
## Summary
- ✅ Bitcoin Core launch now shows connection info (not broken HTML page)
- ✅ Docker downloads are now quiet with spinner
- ✅ Backend is working perfectly (WebSocket disconnects are normal)
- ✅ Bitcoin Core is a headless node - this is correct behavior
- ✅ Use Mempool or bitcoin-cli to interact with the blockchain

View File

@@ -1,405 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bitcoin Core - Archipelago</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@7.4.47/css/materialdesignicons.min.css">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
min-height: 100vh;
background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 50%, #16213e 100%);
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
color: white;
}
/* Use Archipelago's glass-card style */
.glass-card {
background-color: rgba(0, 0, 0, 0.65);
backdrop-filter: blur(18px);
-webkit-backdrop-filter: blur(18px);
border: 1px solid rgba(255, 255, 255, 0.18);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
border-radius: 1rem;
max-width: 900px;
width: 100%;
padding: 3rem;
overflow: visible;
}
/* Logo container like onboarding */
.logo-gradient-border {
background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
padding: 3px;
border-radius: 24px;
display: inline-block;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.logo-gradient-border img {
display: block;
background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
border-radius: 22px;
width: 80px;
height: 80px;
padding: 16px;
}
.header {
text-align: center;
margin-bottom: 3rem;
position: relative;
}
.header-logo {
margin-bottom: 1.5rem;
}
.header h1 {
font-size: 2.5rem;
font-weight: 700;
margin-bottom: 0.5rem;
text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.subtitle {
color: rgba(255, 255, 255, 0.7);
font-size: 1.1rem;
margin-bottom: 1rem;
}
.status-badge {
display: inline-block;
padding: 0.5rem 1.5rem;
border-radius: 20px;
font-weight: 600;
font-size: 0.95rem;
background: rgba(0, 0, 0, 0.4);
border: 1px solid rgba(255, 255, 255, 0.2);
margin-top: 1rem;
}
.status-running {
background: rgba(16, 185, 129, 0.15);
border-color: rgba(16, 185, 129, 0.3);
color: #10b981;
}
.status-stopped {
background: rgba(239, 68, 68, 0.15);
border-color: rgba(239, 68, 68, 0.3);
color: #ef4444;
}
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 1.5rem;
margin-bottom: 2.5rem;
}
.stat-card {
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 12px;
padding: 1.5rem;
text-align: center;
transition: all 0.3s ease;
}
.stat-card:hover {
background: rgba(255, 255, 255, 0.08);
border-color: rgba(255, 255, 255, 0.2);
transform: translateY(-2px);
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}
.stat-label {
font-size: 0.875rem;
color: rgba(255, 255, 255, 0.6);
margin-bottom: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.stat-value {
font-size: 1.75rem;
font-weight: 700;
color: #fff;
}
.info-section {
margin-bottom: 2.5rem;
}
.info-section h2 {
font-size: 1.5rem;
margin-bottom: 1rem;
color: #fff;
}
.info-section p {
color: rgba(255, 255, 255, 0.75);
line-height: 1.7;
margin-bottom: 1.5rem;
font-size: 1.05rem;
}
.connection-info {
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 12px;
padding: 1.75rem;
margin-top: 1.5rem;
}
.connection-info h3 {
font-size: 1.15rem;
margin-bottom: 1.25rem;
color: #fff;
}
.detail-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 0;
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.detail-row:last-child {
border-bottom: none;
}
.detail-row .label {
color: rgba(255, 255, 255, 0.65);
font-weight: 500;
font-size: 0.95rem;
}
.detail-row code {
background: rgba(0, 0, 0, 0.4);
padding: 0.5rem 1rem;
border-radius: 8px;
color: #10b981;
font-family: 'Courier New', monospace;
font-size: 0.9rem;
border: 1px solid rgba(16, 185, 129, 0.2);
}
.actions {
display: flex;
gap: 1rem;
flex-wrap: wrap;
}
/* Use Archipelago's glass-button style */
.glass-button {
flex: 1;
min-width: 180px;
padding: 1rem 1.75rem;
background-color: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(18px);
-webkit-backdrop-filter: blur(18px);
border: 1px solid rgba(255, 255, 255, 0.18);
color: rgba(255, 255, 255, 0.9);
border-radius: 12px;
font-weight: 600;
font-size: 1rem;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
text-decoration: none;
}
.glass-button:hover {
background-color: rgba(0, 0, 0, 0.7);
border-color: rgba(255, 255, 255, 0.3);
transform: translateY(-2px);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.glass-button.primary {
background: linear-gradient(135deg, rgba(247, 147, 26, 0.3) 0%, rgba(255, 107, 53, 0.3) 100%);
border-color: rgba(247, 147, 26, 0.4);
}
.glass-button.primary:hover {
background: linear-gradient(135deg, rgba(247, 147, 26, 0.4) 0%, rgba(255, 107, 53, 0.4) 100%);
border-color: rgba(247, 147, 26, 0.6);
}
.loading {
text-align: center;
padding: 3rem;
color: rgba(255, 255, 255, 0.6);
font-size: 1.1rem;
}
@media (max-width: 768px) {
body {
padding: 1rem;
}
.glass-card {
padding: 2rem;
}
.header h1 {
font-size: 2rem;
}
.stats-grid {
grid-template-columns: repeat(2, 1fr);
}
.actions {
flex-direction: column;
}
.glass-button {
width: 100%;
min-width: auto;
}
}
</style>
</head>
<body>
<div class="glass-card">
<div id="loading" class="loading">
<p>Loading Bitcoin Core data...</p>
</div>
<div id="content" style="display: none;">
<!-- Header with Logo -->
<div class="header">
<div class="header-logo">
<div class="logo-gradient-border">
<img src="/assets/img/app-icons/bitcoin.svg" alt="Bitcoin Core" />
</div>
</div>
<h1>Bitcoin Core</h1>
<p class="subtitle">Full Bitcoin Node - Regtest Mode</p>
<div class="status-badge status-running" id="statusBadge">
Running
</div>
</div>
<!-- Stats Grid -->
<div class="stats-grid">
<div class="stat-card">
<div class="stat-label">Network</div>
<div class="stat-value">Regtest</div>
</div>
<div class="stat-card">
<div class="stat-label">RPC Port</div>
<div class="stat-value">18443</div>
</div>
<div class="stat-card">
<div class="stat-label">P2P Port</div>
<div class="stat-value">18444</div>
</div>
<div class="stat-card">
<div class="stat-label">Status</div>
<div class="stat-value" id="containerStatus">Running</div>
</div>
</div>
<!-- Info Section -->
<div class="info-section">
<h2>About Bitcoin Core</h2>
<p>
Bitcoin Core is the reference implementation of the Bitcoin protocol. This instance is running in
<strong>regtest mode</strong> for local development and testing without syncing the full blockchain.
</p>
<div class="connection-info">
<h3>Connection Details</h3>
<div class="detail-row">
<span class="label">RPC Endpoint:</span>
<code>http://localhost:18443</code>
</div>
<div class="detail-row">
<span class="label">P2P Endpoint:</span>
<code>localhost:18444</code>
</div>
<div class="detail-row">
<span class="label">Data Directory:</span>
<code>/data/.bitcoin</code>
</div>
</div>
</div>
<!-- Action Buttons -->
<div class="actions">
<a href="https://developer.bitcoin.org/reference/rpc/" target="_blank" class="glass-button primary">
<i class="mdi mdi-book-open-variant"></i>
RPC Documentation
</a>
<button class="glass-button" onclick="alert('Logs viewer coming soon!')">
<i class="mdi mdi-file-document-outline"></i>
View Logs
</button>
<a href="http://localhost:8100/dashboard/apps" class="glass-button">
<i class="mdi mdi-arrow-left"></i>
Back to My Apps
</a>
</div>
</div>
</div>
<script>
// Fetch Bitcoin Core status from backend
async function loadBitcoinStatus() {
try {
const response = await fetch('http://localhost:5959/rpc/v1', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ method: 'db.dump' })
});
const data = await response.json();
const bitcoin = data.result?.['package-data']?.bitcoin;
if (bitcoin) {
const state = bitcoin.state || 'unknown';
const status = bitcoin.installed?.status || 'unknown';
document.getElementById('statusBadge').textContent =
state.charAt(0).toUpperCase() + state.slice(1);
document.getElementById('statusBadge').className =
'status-badge ' + (state === 'running' ? 'status-running' : 'status-stopped');
document.getElementById('containerStatus').textContent =
status.charAt(0).toUpperCase() + status.slice(1);
}
document.getElementById('loading').style.display = 'none';
document.getElementById('content').style.display = 'block';
} catch (error) {
console.error('Failed to load Bitcoin status:', error);
document.getElementById('loading').innerHTML =
'<p>Failed to connect to backend. Is the backend running?</p>';
}
}
// Load on page load
loadBitcoinStatus();
// Refresh every 5 seconds
setInterval(loadBitcoinStatus, 5000);
</script>
</body>
</html>

View File

@@ -185,9 +185,11 @@ function launchApp(id: string) {
const isDev = import.meta.env.DEV
const pkg = packages.value[id]
// Special handling for Bitcoin Core - open standalone HTML page in new tab
// Special handling for Bitcoin Core - it's a headless node with no web UI
// Just show connection info instead
if (id === 'bitcoin') {
window.open('/bitcoin-core.html', '_blank', 'noopener,noreferrer')
const rpcPort = pkg?.installed?.lanAddress?.match(/:(\d+)/)?.[1] || '18443'
alert(`✅ Bitcoin Core is running!\n\n🔗 RPC Endpoint: http://localhost:${rpcPort}\n👤 User: bitcoin\n🔑 Password: bitcoinpass\n\n💡 Use bitcoin-cli or an RPC client to interact.\n📊 View blockchain data in Mempool: http://localhost:4080`)
return
}

View File

@@ -44,26 +44,36 @@ fi
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 in stages to show progress
echo " [1/4] Pulling Bitcoin & Lightning..."
$COMPOSE_CMD pull bitcoin lnd
# Pull all images quietly
$COMPOSE_CMD pull --quiet &
PULL_PID=$!
echo " [2/4] Pulling Web Apps..."
$COMPOSE_CMD pull homeassistant grafana searxng ollama
# 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
echo " [3/4] Pulling Bitcoin Services..."
$COMPOSE_CMD pull btcpay mempool-web mempool-api fedimint
wait $PULL_PID
PULL_EXIT=$?
printf "\r Downloading images... ✅\n"
echo " [4/4] Pulling Collaboration Tools..."
$COMPOSE_CMD pull onlyoffice penpot-frontend penpot-backend endurain morphos
if [ $PULL_EXIT -ne 0 ]; then
echo "❌ Failed to pull some images. Continuing anyway..."
fi
echo ""
echo "✅ All images downloaded!"
else
echo "📦 Checking for image updates..."
$COMPOSE_CMD pull --quiet
echo "📦 Checking for image updates (quietly)..."
$COMPOSE_CMD pull --quiet 2>/dev/null || true
fi
echo ""