Initial commit: breakpilot-compliance - Compliance SDK Platform

Services: Admin-Compliance, Backend-Compliance,
AI-Compliance-SDK, Consent-SDK, Developer-Portal,
PCA-Platform, DSMS

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Boenisch
2026-02-11 23:47:28 +01:00
commit 4435e7ea0a
734 changed files with 251369 additions and 0 deletions

View File

@@ -0,0 +1,204 @@
# BreakPilot Compliance SDK - Mac Mini Deployment
# Hardware: Mac Mini M4 Pro, 64GB RAM
# LLM: Qwen 2.5 32B via Ollama
version: '3.8'
services:
# =============================================================================
# API Gateway
# =============================================================================
api-gateway:
image: ghcr.io/breakpilot/compliance-sdk-gateway:latest
build:
context: ../../services/api-gateway
dockerfile: Dockerfile
ports:
- "443:8080"
- "80:8080"
environment:
- ENVIRONMENT=production
- PORT=8080
- DATABASE_URL=postgres://breakpilot:${DB_PASSWORD:-breakpilot}@postgres:5432/compliance
- REDIS_URL=redis://redis:6379
- JWT_SECRET=${JWT_SECRET:-change-me-in-production}
- COMPLIANCE_ENGINE_URL=http://compliance-engine:8081
- RAG_SERVICE_URL=http://rag-service:8082
- SECURITY_SCANNER_URL=http://security-scanner:8083
- MINIO_ENDPOINT=minio:9000
- MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY:-breakpilot}
- MINIO_SECRET_KEY=${MINIO_SECRET_KEY:-breakpilot123}
depends_on:
- postgres
- redis
- compliance-engine
- rag-service
restart: unless-stopped
networks:
- compliance-net
# =============================================================================
# Compliance Engine
# =============================================================================
compliance-engine:
image: ghcr.io/breakpilot/compliance-engine:latest
build:
context: ../../services/compliance-engine
dockerfile: Dockerfile
environment:
- ENVIRONMENT=production
- PORT=8081
- DATABASE_URL=postgres://breakpilot:${DB_PASSWORD:-breakpilot}@postgres:5432/compliance
depends_on:
- postgres
restart: unless-stopped
networks:
- compliance-net
# =============================================================================
# RAG Service
# =============================================================================
rag-service:
image: ghcr.io/breakpilot/rag-service:latest
build:
context: ../../services/rag-service
dockerfile: Dockerfile
environment:
- ENVIRONMENT=production
- PORT=8082
- QDRANT_URL=http://qdrant:6333
- OLLAMA_URL=http://host.docker.internal:11434
- EMBEDDING_MODEL=bge-m3
- LLM_MODEL=qwen2.5:32b
depends_on:
- qdrant
restart: unless-stopped
networks:
- compliance-net
extra_hosts:
- "host.docker.internal:host-gateway"
# =============================================================================
# Security Scanner
# =============================================================================
security-scanner:
image: ghcr.io/breakpilot/security-scanner:latest
build:
context: ../../services/security-scanner
dockerfile: Dockerfile
environment:
- ENVIRONMENT=production
- PORT=8083
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- scan-data:/app/scans
restart: unless-stopped
networks:
- compliance-net
# =============================================================================
# PostgreSQL Database
# =============================================================================
postgres:
image: postgres:16-alpine
environment:
- POSTGRES_USER=breakpilot
- POSTGRES_PASSWORD=${DB_PASSWORD:-breakpilot}
- POSTGRES_DB=compliance
volumes:
- postgres-data:/var/lib/postgresql/data
- ./init-db.sql:/docker-entrypoint-initdb.d/init.sql:ro
ports:
- "5432:5432"
restart: unless-stopped
networks:
- compliance-net
healthcheck:
test: ["CMD-SHELL", "pg_isready -U breakpilot"]
interval: 10s
timeout: 5s
retries: 5
# =============================================================================
# Redis Cache
# =============================================================================
redis:
image: redis:7-alpine
command: redis-server --appendonly yes
volumes:
- redis-data:/data
ports:
- "6379:6379"
restart: unless-stopped
networks:
- compliance-net
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
# =============================================================================
# Qdrant Vector Database
# =============================================================================
qdrant:
image: qdrant/qdrant:v1.12.1
volumes:
- qdrant-data:/qdrant/storage
ports:
- "6333:6333"
- "6334:6334"
restart: unless-stopped
networks:
- compliance-net
environment:
- QDRANT__SERVICE__GRPC_PORT=6334
# =============================================================================
# MinIO Object Storage
# =============================================================================
minio:
image: minio/minio:latest
command: server /data --console-address ":9001"
environment:
- MINIO_ROOT_USER=${MINIO_ACCESS_KEY:-breakpilot}
- MINIO_ROOT_PASSWORD=${MINIO_SECRET_KEY:-breakpilot123}
volumes:
- minio-data:/data
ports:
- "9000:9000"
- "9001:9001"
restart: unless-stopped
networks:
- compliance-net
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
# =============================================================================
# Maintenance Agent (for remote updates)
# =============================================================================
maintenance-agent:
image: ghcr.io/breakpilot/maintenance-agent:latest
environment:
- BREAKPILOT_API_KEY=${MAINTENANCE_API_KEY:-}
- DEVICE_ID=${DEVICE_ID:-mac-mini-001}
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./:/app/deployment:ro
restart: unless-stopped
networks:
- compliance-net
networks:
compliance-net:
driver: bridge
volumes:
postgres-data:
redis-data:
qdrant-data:
minio-data:
scan-data:

View File

@@ -0,0 +1,159 @@
#!/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 "$@"