Files
archy/start-docker-apps.sh
Dorian 10fa19df66 Refactor and enhance Archipelago setup and API
- Revamped GETTING_STARTED.md for clarity and completeness, detailing the Docker development environment and installation steps.
- Updated Cargo.lock and Cargo.toml to replace deprecated dependencies and add new ones, including hyper-ws-listener and env_logger.
- Improved WebSocket handling in the API to support upgrades and error management.
- Enhanced Neode UI scripts to manage Docker containers during development.
- Adjusted dummy app configurations for accurate LAN addresses.
- Sorted app entries in the UI for better organization and accessibility.
2026-01-27 22:47:51 +00:00

134 lines
4.0 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 ""
# Pull in stages to show progress
echo " [1/4] Pulling Bitcoin & Lightning..."
$COMPOSE_CMD pull bitcoin lnd
echo " [2/4] Pulling Web Apps..."
$COMPOSE_CMD pull homeassistant grafana searxng ollama
echo " [3/4] Pulling Bitcoin Services..."
$COMPOSE_CMD pull btcpay mempool-web mempool-api fedimint
echo " [4/4] Pulling Collaboration Tools..."
$COMPOSE_CMD pull onlyoffice penpot-frontend penpot-backend endurain morphos
echo ""
echo "✅ All images downloaded!"
else
echo "📦 Checking for image updates..."
$COMPOSE_CMD pull --quiet
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"