Replace Hetzner references with Coolify. Deployment is now: - Core + Compliance: Push gitea → Coolify auto-deploys - Lehrer: stays local on Mac Mini Updated: CLAUDE.md, MkDocs CI/CD pipeline, MkDocs index. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
6.0 KiB
6.0 KiB
CI/CD Pipeline
Uebersicht ueber den Deployment-Prozess fuer BreakPilot Compliance.
Uebersicht
| Komponente | Build-Tool | Deployment |
|---|---|---|
| Frontend (Next.js) | Docker | Coolify (automatisch) |
| Backend (FastAPI) | Docker | Coolify (automatisch) |
| Go Services | Docker (Multi-stage) | Coolify (automatisch) |
| Documentation | MkDocs | Docker (Nginx, lokal) |
Deployment-Architektur
┌─────────────────────────────────────────────────────────────────┐
│ Entwickler-MacBook │
│ │
│ breakpilot-compliance/ │
│ ├── admin-compliance/ (Next.js Dashboard) │
│ ├── backend-compliance/ (Python FastAPI) │
│ ├── ai-compliance-sdk/ (Go/Gin) │
│ ├── developer-portal/ (Next.js) │
│ └── docs-src/ (MkDocs) │
│ │
│ git push origin main && git push gitea main │
└───────────────────────────────┬─────────────────────────────────┘
│
│ git push
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ Gitea (gitea.meghsakha.com) │
│ │
│ Gitea Actions CI: │
│ ├── test-go-ai-compliance │
│ ├── test-python-backend-compliance │
│ ├── test-python-document-crawler │
│ ├── test-python-dsms-gateway │
│ └── validate-canonical-controls │
│ │
│ Coolify Webhook → Build + Deploy (automatisch) │
└─────────────────────────────────────────────────────────────────┘
│
│ auto-deploy
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ Production (Coolify) │
│ │
│ ├── admin-dev.breakpilot.ai (Admin Compliance) │
│ ├── api-dev.breakpilot.ai (Backend API) │
│ ├── sdk-dev.breakpilot.ai (AI SDK) │
│ └── developers-dev.breakpilot.ai (Developer Portal) │
└─────────────────────────────────────────────────────────────────┘
Workflow
1. Code entwickeln und committen
# Code auf MacBook bearbeiten
# Committen und zu beiden Remotes pushen:
git push origin main && git push gitea main
2. Automatische Tests (Gitea Actions)
Push auf gitea triggert automatisch die CI-Pipeline:
- Go Tests:
ai-compliance-sdkUnit Tests - Python Tests:
backend-compliance,document-crawler,dsms-gateway - Validierung: Canonical Controls JSON-Validierung
- Lint: Go, Python, Node.js (nur bei PRs)
3. Automatisches Deployment (Coolify)
Nach erfolgreichem Push baut Coolify automatisch alle Services und deployt sie.
WICHTIG: Niemals manuell in Coolify auf "Redeploy" klicken!
4. Health Checks
# Production Health pruefen
curl -sf https://api-dev.breakpilot.ai/health
curl -sf https://sdk-dev.breakpilot.ai/health
CI Pipeline-Konfiguration
Datei: .gitea/workflows/ci.yaml
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
test-go-ai-compliance: # Go Unit Tests
test-python-backend: # Python Unit Tests
test-python-document-crawler:
test-python-dsms-gateway:
validate-canonical-controls: # JSON Validierung
go-lint: # Nur bei PRs
python-lint: # Nur bei PRs
nodejs-lint: # Nur bei PRs
Lokale Entwicklung (Mac Mini)
Fuer lokale Tests ohne Coolify:
# Auf Mac Mini pullen und bauen
ssh macmini "git -C ~/Projekte/breakpilot-compliance pull --no-rebase origin main"
ssh macmini "/usr/local/bin/docker compose -f ~/Projekte/breakpilot-compliance/docker-compose.yml build --no-cache <service>"
ssh macmini "/usr/local/bin/docker compose -f ~/Projekte/breakpilot-compliance/docker-compose.yml up -d <service>"
Troubleshooting
CI-Status pruefen
# Im Browser:
# https://gitea.meghsakha.com/Benjamin_Boenisch/breakpilot-compliance/actions
Container-Logs (lokal)
ssh macmini "/usr/local/bin/docker logs -f bp-compliance-<service>"
Build-Fehler
# Lokalen Build-Cache leeren
ssh macmini "/usr/local/bin/docker builder prune -a"