Add Windows quick start scripts and update documentation
New files: - quickstart.bat - Windows batch script for Command Prompt - quickstart.ps1 - Windows PowerShell script with colored output - Both scripts auto-detect Docker/Docker Compose - Automatically open browser after setup - Error handling and user-friendly messages Updated: - README.md - Added one-command setup section for all platforms - Highlighted Web UI as primary access method Now Windows users can run: quickstart.bat (Command Prompt) quickstart.ps1 (PowerShell) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
129
quickstart.ps1
Normal file
129
quickstart.ps1
Normal file
@@ -0,0 +1,129 @@
|
||||
# Test Artifact Data Lake - Quick Start (PowerShell)
|
||||
|
||||
Write-Host "=========================================" -ForegroundColor Cyan
|
||||
Write-Host "Test Artifact Data Lake - Quick Start" -ForegroundColor Cyan
|
||||
Write-Host "=========================================" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
|
||||
# Check if Docker is installed
|
||||
try {
|
||||
$dockerVersion = docker --version
|
||||
Write-Host "[OK] Docker found: $dockerVersion" -ForegroundColor Green
|
||||
} catch {
|
||||
Write-Host "[ERROR] Docker is not installed." -ForegroundColor Red
|
||||
Write-Host "Please install Docker Desktop first:" -ForegroundColor Yellow
|
||||
Write-Host "https://www.docker.com/products/docker-desktop" -ForegroundColor Yellow
|
||||
Read-Host "Press Enter to exit"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Determine Docker Compose command
|
||||
$composeCmd = "docker-compose"
|
||||
try {
|
||||
docker-compose version | Out-Null
|
||||
} catch {
|
||||
# Try new docker compose syntax
|
||||
try {
|
||||
docker compose version | Out-Null
|
||||
$composeCmd = "docker compose"
|
||||
} catch {
|
||||
Write-Host "[ERROR] Docker Compose is not available." -ForegroundColor Red
|
||||
Write-Host "Please ensure Docker Desktop is running." -ForegroundColor Yellow
|
||||
Read-Host "Press Enter to exit"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "[OK] Using: $composeCmd" -ForegroundColor Green
|
||||
|
||||
# Create .env file if it doesn't exist
|
||||
if (-Not (Test-Path ".env")) {
|
||||
Write-Host "Creating .env file from .env.example..." -ForegroundColor Yellow
|
||||
Copy-Item .env.example .env
|
||||
Write-Host "[OK] .env file created" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "[OK] .env file already exists" -ForegroundColor Green
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "Starting services with Docker Compose..." -ForegroundColor Yellow
|
||||
|
||||
# Start services
|
||||
if ($composeCmd -eq "docker-compose") {
|
||||
docker-compose up -d
|
||||
} else {
|
||||
docker compose up -d
|
||||
}
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host ""
|
||||
Write-Host "[ERROR] Failed to start services." -ForegroundColor Red
|
||||
Write-Host "Make sure Docker Desktop is running." -ForegroundColor Yellow
|
||||
Read-Host "Press Enter to exit"
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "Waiting for services to be ready..." -ForegroundColor Yellow
|
||||
Start-Sleep -Seconds 15
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "=========================================" -ForegroundColor Cyan
|
||||
Write-Host "Services are running!" -ForegroundColor Green
|
||||
Write-Host "=========================================" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
Write-Host "Web UI: " -NoNewline
|
||||
Write-Host "http://localhost:8000" -ForegroundColor Yellow
|
||||
Write-Host "API Docs: " -NoNewline
|
||||
Write-Host "http://localhost:8000/docs" -ForegroundColor Yellow
|
||||
Write-Host "MinIO Console: " -NoNewline
|
||||
Write-Host "http://localhost:9001" -ForegroundColor Yellow
|
||||
Write-Host " Username: minioadmin"
|
||||
Write-Host " Password: minioadmin"
|
||||
Write-Host ""
|
||||
Write-Host "To view logs: $composeCmd logs -f" -ForegroundColor Cyan
|
||||
Write-Host "To stop: $composeCmd down" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
Write-Host "=========================================" -ForegroundColor Cyan
|
||||
Write-Host "Testing the API..." -ForegroundColor Yellow
|
||||
Write-Host "=========================================" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
|
||||
# Wait a bit more for API
|
||||
Start-Sleep -Seconds 5
|
||||
|
||||
# Test health endpoint
|
||||
try {
|
||||
$response = Invoke-WebRequest -Uri "http://localhost:8000/health" -UseBasicParsing -TimeoutSec 5
|
||||
if ($response.Content -like "*healthy*") {
|
||||
Write-Host "[OK] API is healthy!" -ForegroundColor Green
|
||||
Write-Host ""
|
||||
Write-Host "=========================================" -ForegroundColor Cyan
|
||||
Write-Host "Opening browser..." -ForegroundColor Yellow
|
||||
Write-Host "http://localhost:8000" -ForegroundColor Yellow
|
||||
Write-Host "=========================================" -ForegroundColor Cyan
|
||||
|
||||
# Open browser
|
||||
Start-Process "http://localhost:8000"
|
||||
}
|
||||
} catch {
|
||||
Write-Host "[WARNING] API is not responding yet." -ForegroundColor Yellow
|
||||
Write-Host "Please wait a moment and check http://localhost:8000" -ForegroundColor Yellow
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "=========================================" -ForegroundColor Cyan
|
||||
Write-Host "Setup complete! " -NoNewline
|
||||
Write-Host "🚀" -ForegroundColor Green
|
||||
Write-Host "=========================================" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
Write-Host "Useful Commands:" -ForegroundColor Cyan
|
||||
Write-Host " Generate seed data: " -NoNewline
|
||||
Write-Host "Use the 'Generate Seed Data' button in the UI" -ForegroundColor Yellow
|
||||
Write-Host " View logs: " -NoNewline
|
||||
Write-Host "$composeCmd logs -f api" -ForegroundColor Yellow
|
||||
Write-Host " Restart services: " -NoNewline
|
||||
Write-Host "$composeCmd restart" -ForegroundColor Yellow
|
||||
Write-Host " Stop all: " -NoNewline
|
||||
Write-Host "$composeCmd down" -ForegroundColor Yellow
|
||||
Write-Host ""
|
||||
Reference in New Issue
Block a user