feat: BreakPilot PWA - Full codebase (clean push without large binaries)
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
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
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.
This commit is contained in:
39
docker/jibri/Dockerfile
Normal file
39
docker/jibri/Dockerfile
Normal file
@@ -0,0 +1,39 @@
|
||||
# Jibri mit MinIO Client, ffmpeg und Xvfb
|
||||
# Erweitert das offizielle Jibri-Image um Upload-Funktionalitaet und X11 Display
|
||||
|
||||
FROM jitsi/jibri:stable-9823
|
||||
|
||||
USER root
|
||||
|
||||
# Xvfb, MinIO Client und ffmpeg installieren
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
curl \
|
||||
ffmpeg \
|
||||
xvfb \
|
||||
x11vnc \
|
||||
&& curl -fsSL https://dl.min.io/client/mc/release/linux-amd64/mc -o /usr/local/bin/mc \
|
||||
&& chmod +x /usr/local/bin/mc \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# finalize.sh Script kopieren und ausfuehrbar machen
|
||||
COPY finalize.sh /config/finalize.sh
|
||||
RUN chmod +x /config/finalize.sh
|
||||
|
||||
# Xvfb Startup Script
|
||||
COPY start-xvfb.sh /usr/local/bin/start-xvfb.sh
|
||||
RUN chmod +x /usr/local/bin/start-xvfb.sh
|
||||
|
||||
# Fix permissions for s6 init system
|
||||
RUN mkdir -p /var/run/s6 && chown -R jibri:jibri /var/run/s6
|
||||
RUN chown -R jibri:jibri /config
|
||||
|
||||
# Xvfb Display Konfiguration
|
||||
ENV DISPLAY=:0
|
||||
ENV RESOLUTION=1920x1080x24
|
||||
|
||||
# Custom entrypoint that starts Xvfb
|
||||
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
||||
RUN chmod +x /docker-entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
27
docker/jibri/docker-entrypoint.sh
Normal file
27
docker/jibri/docker-entrypoint.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
# Jibri Entrypoint mit Xvfb Support
|
||||
# Startet zuerst Xvfb, dann den normalen Jibri-Prozess
|
||||
|
||||
set -e
|
||||
|
||||
echo "=== BreakPilot Jibri Entrypoint ==="
|
||||
echo "DISPLAY: ${DISPLAY}"
|
||||
echo "RESOLUTION: ${RESOLUTION}"
|
||||
|
||||
# Start Xvfb
|
||||
echo "[Entrypoint] Starting Xvfb..."
|
||||
/usr/local/bin/start-xvfb.sh
|
||||
|
||||
# Export DISPLAY for child processes
|
||||
export DISPLAY=${DISPLAY:-:0}
|
||||
|
||||
# Optional: Start x11vnc for debugging (only if VNC_PASSWORD is set)
|
||||
if [ -n "${VNC_PASSWORD}" ]; then
|
||||
echo "[Entrypoint] Starting x11vnc on port 5900..."
|
||||
x11vnc -display ${DISPLAY} -forever -passwd "${VNC_PASSWORD}" -bg -rfbport 5900
|
||||
fi
|
||||
|
||||
echo "[Entrypoint] Starting Jibri..."
|
||||
|
||||
# Execute the original Jibri entrypoint (s6-based init)
|
||||
exec /init "$@"
|
||||
92
docker/jibri/finalize.sh
Executable file
92
docker/jibri/finalize.sh
Executable file
@@ -0,0 +1,92 @@
|
||||
#!/bin/bash
|
||||
# Jibri Finalize Script
|
||||
# Wird aufgerufen wenn eine Aufzeichnung beendet ist
|
||||
# Uploaded die Aufzeichnung zu MinIO und benachrichtigt das Backend
|
||||
|
||||
set -e
|
||||
|
||||
RECORDINGS_DIR="$1"
|
||||
RECORDING_NAME=$(basename "$RECORDINGS_DIR")
|
||||
|
||||
echo "[Finalize] Starting finalization for: $RECORDING_NAME"
|
||||
echo "[Finalize] Recordings directory: $RECORDINGS_DIR"
|
||||
|
||||
# Finde die Aufzeichnungsdatei
|
||||
RECORDING_FILE=$(find "$RECORDINGS_DIR" -name "*.mp4" | head -1)
|
||||
|
||||
if [ -z "$RECORDING_FILE" ]; then
|
||||
echo "[Finalize] ERROR: No MP4 file found in $RECORDINGS_DIR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "[Finalize] Found recording file: $RECORDING_FILE"
|
||||
FILE_SIZE=$(stat -c%s "$RECORDING_FILE" 2>/dev/null || stat -f%z "$RECORDING_FILE")
|
||||
echo "[Finalize] File size: $FILE_SIZE bytes"
|
||||
|
||||
# MinIO Upload mit mc (MinIO Client)
|
||||
MINIO_ALIAS="minio"
|
||||
BUCKET="${MINIO_BUCKET:-breakpilot-recordings}"
|
||||
DEST_PATH="recordings/${RECORDING_NAME}/video.mp4"
|
||||
|
||||
# MinIO Client konfigurieren (wenn noch nicht konfiguriert)
|
||||
if ! mc alias list | grep -q "$MINIO_ALIAS"; then
|
||||
echo "[Finalize] Configuring MinIO client..."
|
||||
mc alias set "$MINIO_ALIAS" "http://${MINIO_ENDPOINT:-minio:9000}" \
|
||||
"${MINIO_ACCESS_KEY:-minioadmin}" \
|
||||
"${MINIO_SECRET_KEY:-minioadmin}"
|
||||
fi
|
||||
|
||||
# Bucket erstellen falls nicht vorhanden
|
||||
mc mb --ignore-existing "${MINIO_ALIAS}/${BUCKET}"
|
||||
|
||||
# Upload
|
||||
echo "[Finalize] Uploading to MinIO: ${BUCKET}/${DEST_PATH}"
|
||||
mc cp "$RECORDING_FILE" "${MINIO_ALIAS}/${BUCKET}/${DEST_PATH}"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "[Finalize] Upload successful!"
|
||||
|
||||
# Audio extrahieren fuer Transkription
|
||||
AUDIO_FILE="${RECORDINGS_DIR}/audio.wav"
|
||||
echo "[Finalize] Extracting audio for transcription..."
|
||||
ffmpeg -i "$RECORDING_FILE" -vn -acodec pcm_s16le -ar 16000 -ac 1 "$AUDIO_FILE" -y 2>/dev/null
|
||||
|
||||
if [ -f "$AUDIO_FILE" ]; then
|
||||
AUDIO_DEST_PATH="recordings/${RECORDING_NAME}/audio.wav"
|
||||
mc cp "$AUDIO_FILE" "${MINIO_ALIAS}/${BUCKET}/${AUDIO_DEST_PATH}"
|
||||
echo "[Finalize] Audio extracted and uploaded: ${AUDIO_DEST_PATH}"
|
||||
fi
|
||||
|
||||
# Backend Webhook benachrichtigen
|
||||
if [ -n "$BACKEND_WEBHOOK_URL" ]; then
|
||||
echo "[Finalize] Notifying backend webhook..."
|
||||
METADATA_FILE=$(find "$RECORDINGS_DIR" -name "*.json" | head -1)
|
||||
|
||||
WEBHOOK_PAYLOAD=$(cat <<EOF
|
||||
{
|
||||
"event": "recording_completed",
|
||||
"recording_name": "${RECORDING_NAME}",
|
||||
"storage_path": "${DEST_PATH}",
|
||||
"audio_path": "recordings/${RECORDING_NAME}/audio.wav",
|
||||
"file_size_bytes": ${FILE_SIZE},
|
||||
"timestamp": "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
||||
}
|
||||
EOF
|
||||
)
|
||||
|
||||
curl -X POST "$BACKEND_WEBHOOK_URL" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "$WEBHOOK_PAYLOAD" \
|
||||
--max-time 30 \
|
||||
|| echo "[Finalize] WARNING: Webhook notification failed"
|
||||
fi
|
||||
|
||||
# Lokale Dateien aufraeumen
|
||||
echo "[Finalize] Cleaning up local files..."
|
||||
rm -rf "$RECORDINGS_DIR"
|
||||
|
||||
echo "[Finalize] Finalization completed successfully!"
|
||||
else
|
||||
echo "[Finalize] ERROR: Upload failed!"
|
||||
exit 1
|
||||
fi
|
||||
26
docker/jibri/start-xvfb.sh
Normal file
26
docker/jibri/start-xvfb.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
# Start Xvfb (Virtual Framebuffer) for Jibri recording
|
||||
|
||||
set -e
|
||||
|
||||
DISPLAY_NUM="${DISPLAY_NUM:-0}"
|
||||
RESOLUTION="${RESOLUTION:-1920x1080x24}"
|
||||
|
||||
echo "[Xvfb] Starting virtual display :${DISPLAY_NUM} with resolution ${RESOLUTION}"
|
||||
|
||||
# Remove any existing lock files
|
||||
rm -f /tmp/.X${DISPLAY_NUM}-lock
|
||||
|
||||
# Start Xvfb in background
|
||||
Xvfb :${DISPLAY_NUM} -screen 0 ${RESOLUTION} -ac +extension GLX +render -noreset &
|
||||
|
||||
# Wait for Xvfb to start
|
||||
sleep 2
|
||||
|
||||
# Verify display is working
|
||||
if xdpyinfo -display :${DISPLAY_NUM} >/dev/null 2>&1; then
|
||||
echo "[Xvfb] Display :${DISPLAY_NUM} is ready"
|
||||
else
|
||||
echo "[Xvfb] ERROR: Display :${DISPLAY_NUM} failed to start"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user