This repository has been archived on 2026-02-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
BreakPilot Dev 19855efacc
Some checks failed
Tests / Go Tests (push) Has been cancelled
Tests / Python Tests (push) Has been cancelled
Tests / Integration Tests (push) Has been cancelled
Tests / Go Lint (push) Has been cancelled
Tests / Python Lint (push) Has been cancelled
Tests / Security Scan (push) Has been cancelled
Tests / All Checks Passed (push) Has been cancelled
Security Scanning / Secret Scanning (push) Has been cancelled
Security Scanning / Dependency Vulnerability Scan (push) Has been cancelled
Security Scanning / Go Security Scan (push) Has been cancelled
Security Scanning / Python Security Scan (push) Has been cancelled
Security Scanning / Node.js Security Scan (push) Has been cancelled
Security Scanning / Docker Image Security (push) Has been cancelled
Security Scanning / Security Summary (push) Has been cancelled
CI/CD Pipeline / Go Tests (push) Has been cancelled
CI/CD Pipeline / Python Tests (push) Has been cancelled
CI/CD Pipeline / Website Tests (push) Has been cancelled
CI/CD Pipeline / Linting (push) Has been cancelled
CI/CD Pipeline / Security Scan (push) Has been cancelled
CI/CD Pipeline / Docker Build & Push (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Deploy to Staging (push) Has been cancelled
CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / CI Summary (push) Has been cancelled
ci/woodpecker/manual/build-ci-image Pipeline was successful
ci/woodpecker/manual/main Pipeline failed
feat: BreakPilot PWA - Full codebase (clean push without large binaries)
All services: admin-v2, studio-v2, website, ai-compliance-sdk,
consent-service, klausur-service, voice-service, and infrastructure.
Large PDFs and compiled binaries excluded via .gitignore.
2026-02-11 13:25:58 +01:00

160 lines
3.9 KiB
Bash

#!/bin/bash
# BreakPilot Compliance SDK - Mac Mini Setup Script
# Hardware: Mac Mini M4 Pro, 64GB RAM
set -e
echo "=========================================="
echo "BreakPilot Compliance SDK - Mac Mini Setup"
echo "=========================================="
# Check prerequisites
check_prerequisites() {
echo "Checking prerequisites..."
# Check Docker
if ! command -v docker &> /dev/null; then
echo "Error: Docker is not installed"
echo "Please install Docker Desktop for Mac from https://www.docker.com/products/docker-desktop"
exit 1
fi
# Check Ollama
if ! command -v ollama &> /dev/null; then
echo "Installing Ollama..."
curl -fsSL https://ollama.com/install.sh | sh
fi
echo "Prerequisites OK"
}
# Configure Docker resources
configure_docker() {
echo "Configuring Docker resources..."
# Docker Desktop settings recommendation
echo ""
echo "Please ensure Docker Desktop is configured with:"
echo " - Memory: 32 GB (minimum)"
echo " - CPUs: 10 (recommended)"
echo " - Disk: 100 GB (minimum)"
echo ""
echo "You can configure this in Docker Desktop > Settings > Resources"
echo ""
read -p "Press Enter when Docker is configured..."
}
# Install LLM models
install_models() {
echo "Installing LLM models..."
# Pull embedding model
echo "Pulling embedding model (bge-m3)..."
ollama pull bge-m3
# Pull main LLM
echo "Pulling Qwen 2.5 32B (this may take a while)..."
ollama pull qwen2.5:32b
echo "Models installed successfully"
}
# Create environment file
create_env_file() {
echo "Creating environment file..."
if [ -f .env ]; then
echo ".env file already exists, skipping..."
return
fi
# Generate random secrets
JWT_SECRET=$(openssl rand -hex 32)
DB_PASSWORD=$(openssl rand -hex 16)
MINIO_SECRET=$(openssl rand -hex 16)
cat > .env << EOF
# BreakPilot Compliance SDK - Environment Configuration
# Generated on $(date)
# Database
DB_PASSWORD=${DB_PASSWORD}
# JWT
JWT_SECRET=${JWT_SECRET}
# MinIO
MINIO_ACCESS_KEY=breakpilot
MINIO_SECRET_KEY=${MINIO_SECRET}
# Maintenance (optional)
MAINTENANCE_API_KEY=
DEVICE_ID=mac-mini-$(hostname | tr '[:upper:]' '[:lower:]')
EOF
echo ".env file created"
echo "IMPORTANT: Keep this file secure and back it up!"
}
# Start services
start_services() {
echo "Starting services..."
docker compose up -d
echo "Waiting for services to be ready..."
sleep 10
# Check health
echo "Checking service health..."
if curl -s http://localhost:80/health | grep -q "healthy"; then
echo "API Gateway: OK"
else
echo "API Gateway: Not ready yet (this is normal during first start)"
fi
}
# Print summary
print_summary() {
echo ""
echo "=========================================="
echo "Setup Complete!"
echo "=========================================="
echo ""
echo "Services:"
echo " API Gateway: https://localhost (or http://localhost:80)"
echo " PostgreSQL: localhost:5432"
echo " Redis: localhost:6379"
echo " Qdrant: localhost:6333"
echo " MinIO Console: http://localhost:9001"
echo ""
echo "LLM Models (via Ollama on host):"
echo " Embedding: bge-m3"
echo " Chat: qwen2.5:32b"
echo ""
echo "Commands:"
echo " Start: docker compose up -d"
echo " Stop: docker compose down"
echo " Logs: docker compose logs -f"
echo " Status: docker compose ps"
echo ""
echo "Next steps:"
echo " 1. Configure your client with API endpoint: http://$(hostname):80/api/v1"
echo " 2. Generate an API key from the admin dashboard"
echo " 3. Start integrating the SDK in your application"
echo ""
}
# Main
main() {
check_prerequisites
configure_docker
install_models
create_env_file
start_services
print_summary
}
main "$@"