Add better documentation and scripts for air-gapped deployment
Created new helper scripts: - quickstart-airgap.sh: One-command deployment for restricted environments - check-ready.sh: Validates that pre-built files exist before deployment Updated documentation: - Enhanced Dockerfile.frontend.prebuilt with clearer error messages - Updated DEPLOYMENT.md with step-by-step quick start guide - Updated README.md to distinguish standard vs air-gapped deployment Key improvements: - Clear warning that build must happen BEFORE docker-compose - Helper script that combines build + deployment steps - Readiness check to catch missing pre-built files early - Better instructions for test environments with restricted npm access This addresses the common error where Docker fails because frontend/dist/frontend/browser doesn't exist yet. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
75
quickstart-airgap.sh
Executable file
75
quickstart-airgap.sh
Executable file
@@ -0,0 +1,75 @@
|
||||
#!/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: Building Angular frontend locally..."
|
||||
echo "==========================================="
|
||||
./build-for-airgap.sh
|
||||
|
||||
echo ""
|
||||
echo "Step 2: Starting Docker containers..."
|
||||
echo "==========================================="
|
||||
docker-compose up -d --build
|
||||
|
||||
echo ""
|
||||
echo "Step 3: Waiting for services to be ready..."
|
||||
sleep 15
|
||||
|
||||
echo ""
|
||||
echo "========================================="
|
||||
echo "Services are running!"
|
||||
echo "========================================="
|
||||
echo ""
|
||||
echo "Frontend: http://localhost:4200"
|
||||
echo "API: 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
|
||||
Reference in New Issue
Block a user