archy/start-docker-apps.sh
Dorian 36233377d9 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.
2026-01-27 23:25:29 +00:00

144 lines
4.2 KiB
Bash
Executable File

#!/bin/bash
# Archipelago Docker Environment Startup Script
# This script starts all the containerized apps for development
set -e
echo "🏝️ Starting Archipelago Docker Environment..."
echo ""
# Check if Docker is running
if ! docker info > /dev/null 2>&1; then
echo "❌ Docker is not running. Please start Docker Desktop and try again."
exit 1
fi
# Check if docker-compose is available
if ! command -v docker-compose &> /dev/null && ! docker compose version &> /dev/null 2>&1; then
echo "❌ docker-compose not found. Please install docker-compose."
exit 1
fi
# Use docker compose (new) or docker-compose (old)
if docker compose version &> /dev/null 2>&1; then
COMPOSE_CMD="docker compose"
else
COMPOSE_CMD="docker-compose"
fi
# Check if this is first run (no images pulled)
FIRST_RUN=false
if ! docker images | grep -q "lncm/bitcoind\|homeassistant/home-assistant\|grafana/grafana"; then
FIRST_RUN=true
echo "📥 First run detected! This will download Docker images (~3-5GB)."
echo " This may take 10-30 minutes depending on your internet speed."
echo ""
read -p " Continue? (y/N) " -n 1 -r
echo ""
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo "Cancelled."
exit 0
fi
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 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
echo ""
echo "✅ All images downloaded!"
else
echo "📦 Checking for image updates (quietly)..."
$COMPOSE_CMD pull --quiet 2>/dev/null || true
fi
echo ""
echo "🚀 Starting all containers..."
$COMPOSE_CMD up -d
echo ""
echo "⏳ Waiting for services to be ready..."
sleep 5
# Check health of key services
echo ""
echo "🔍 Checking service health..."
READY_COUNT=0
TOTAL_SERVICES=13
check_service() {
local name=$1
local url=$2
if curl -sf "$url" > /dev/null 2>&1; then
echo "$name is ready"
((READY_COUNT++))
else
echo "$name is starting..."
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"
echo ""
echo "📊 Container Status:"
$COMPOSE_CMD ps
echo ""
echo "🌐 Apps are available at:"
echo ""
echo " 💰 Bitcoin & Lightning:"
echo " • Bitcoin Core (regtest): RPC at localhost:18443"
echo " • Lightning (LND REST): http://localhost:8080"
echo " • BTCPay Server: http://localhost:14142"
echo " • Mempool Explorer: http://localhost:4080"
echo " • Fedimint: http://localhost:8173"
echo ""
echo " 🏠 Self-Hosted Services:"
echo " • Home Assistant: http://localhost:8123"
echo " • Grafana: http://localhost:3000 (admin/admin)"
echo " • SearXNG: http://localhost:8082"
echo " • Ollama (API): http://localhost:11434"
echo ""
echo " 📝 Collaboration:"
echo " • OnlyOffice: http://localhost:8083"
echo " • Penpot: http://localhost:9001"
echo ""
echo " 🚧 Placeholders:"
echo " • Endurain: http://localhost:8084"
echo " • MorphOS Server: http://localhost:8081"
echo ""
echo "💡 Tips:"
echo " • View logs: $COMPOSE_CMD logs -f [service-name]"
echo " • Stop all: $COMPOSE_CMD down"
echo " • Restart service: $COMPOSE_CMD restart [service-name]"
echo " • Check status: $COMPOSE_CMD ps"
echo ""
echo "🎉 Ready! Open http://localhost:8100 to access the Neode UI"