Files
warehouse13/quickstart-airgap.sh
2025-10-16 13:02:50 -05:00

70 lines
2.0 KiB
Bash
Executable File

#!/bin/bash
set -e
echo "========================================="
echo "Warehouse13 - Air-Gapped Quick Start"
echo "========================================="
echo ""
echo "This script is for restricted/air-gapped environments"
echo "where npm packages cannot be downloaded during Docker build."
echo ""
# Check if we're in the right directory
if [ ! -f "docker-compose.yml" ]; then
echo "Error: Must run from project root directory"
exit 1
fi
# Check if Docker is installed
if ! command -v docker &> /dev/null; then
echo "Error: Docker is not installed. Please install Docker first."
exit 1
fi
# Check if Docker Compose is installed
if ! command -v docker-compose &> /dev/null; then
echo "Error: Docker Compose is not installed. Please install Docker Compose first."
exit 1
fi
echo "Step 1: Starting Docker containers..."
echo "==========================================="
docker-compose up -d --build
echo ""
echo "Step 2: Waiting for services to be ready..."
sleep 15
echo ""
echo "========================================="
echo "Services are running!"
echo "========================================="
echo ""
echo "Web UI: http://localhost:8000"
echo "API Docs: http://localhost:8000/docs"
echo "MinIO Console: http://localhost:9001"
echo " Username: minioadmin"
echo " Password: minioadmin"
echo ""
echo "To view logs: docker-compose logs -f"
echo "To stop: docker-compose down"
echo ""
echo "========================================="
echo "Testing the API..."
echo "========================================="
# Wait a bit more for API to be fully ready
sleep 5
# Test health endpoint
if curl -s http://localhost:8000/health | grep -q "healthy"; then
echo "✓ API is healthy!"
echo ""
echo "========================================="
echo "Setup complete! 🚀"
echo "========================================="
else
echo "⚠ API is not responding yet. Please wait a moment and check http://localhost:8000/health"
fi