Add full demo environment with 13 services across 4 categories: - Infrastructure: Homepage, Docker Socket Proxy, Pi-hole, Portainer - Monitoring: InfluxDB, Grafana - Documentation: Draw.io, Kroki - Developer Tools: Atomic Tracker, ArchiveBox, Tube Archivist, Wakapi, MailHog, Atuin Includes: - Docker Compose templates with dynamic environment configuration - Deployment orchestration scripts with user ID detection - Comprehensive test suite (unit, integration, e2e) - Pre-deployment validation with yamllint, shellcheck - Full documentation (PRD, AGENTS, README) - Service configurations for all components All services configured for demo purposes with: - Dynamic UID/GID mapping - Docker socket proxy security - Health checks and monitoring - Service discovery via Homepage labels Ports allocated 4000-4099 range with sequential assignment. 💘 Generated with Crush Assisted-by: GLM-4.7 via Crush <crush@charm.land>
55 lines
1.5 KiB
Bash
Executable File
55 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
# E2E test: Complete deployment workflow
|
|
|
|
set -euo pipefail
|
|
|
|
test_complete_deployment() {
|
|
echo "Testing complete deployment workflow..."
|
|
|
|
# Step 1: Clean environment
|
|
docker compose down -v 2>/dev/null || true
|
|
docker system prune -f 2>/dev/null || true
|
|
|
|
# Step 2: Run deployment script
|
|
if ./scripts/demo-stack.sh deploy; then
|
|
echo "PASS: Deployment script execution"
|
|
else
|
|
echo "FAIL: Deployment script execution"
|
|
return 1
|
|
fi
|
|
|
|
# Step 3: Wait for services
|
|
sleep 60
|
|
|
|
# Step 4: Validate all services are healthy
|
|
local unhealthy_count
|
|
unhealthy_count=$(docker compose ps | grep -c "unhealthy\|exited" || echo "0")
|
|
if [[ $unhealthy_count -eq 0 ]]; then
|
|
echo "PASS: All services healthy"
|
|
else
|
|
echo "FAIL: $unhealthy_count services unhealthy"
|
|
return 1
|
|
fi
|
|
|
|
# Step 5: Validate all ports accessible
|
|
local failed_ports=0
|
|
local ports=(4000 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4017 4018)
|
|
|
|
for port in "${ports[@]}"; do
|
|
if ! curl -f -s --max-time 5 "http://localhost:$port" >/dev/null 2>&1; then
|
|
((failed_ports++))
|
|
fi
|
|
done
|
|
|
|
if [[ $failed_ports -eq 0 ]]; then
|
|
echo "PASS: All ports accessible"
|
|
else
|
|
echo "FAIL: $failed_ports ports inaccessible"
|
|
return 1
|
|
fi
|
|
|
|
echo "PASS: Complete deployment workflow"
|
|
return 0
|
|
}
|
|
|
|
test_complete_deployment |