Files
warehouse13/quickstart.ps1
Mondo Diaz 17fc9c9b75 Update quickstart scripts to always rebuild containers
- Added --build flag to docker-compose up command
- Ensures latest code changes are always included
- Prevents issues with stale cached images
- Updated all three quickstart scripts (Linux/macOS, Windows batch, PowerShell)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-15 09:06:50 -05:00

130 lines
4.8 KiB
PowerShell

# Test Artifact Data Lake - Quick Start (PowerShell)
Write-Host "=========================================" -ForegroundColor Cyan
Write-Host "Obsidian - 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 "Building and starting services with Docker Compose..." -ForegroundColor Yellow
# Start services with rebuild
if ($composeCmd -eq "docker-compose") {
docker-compose up -d --build
} else {
docker compose up -d --build
}
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 ""