fix: Restore all files lost during destructive rebase
A previous `git pull --rebase origin main` dropped 177 local commits,
losing 3400+ files across admin-v2, backend, studio-v2, website,
klausur-service, and many other services. The partial restore attempt
(660295e2) only recovered some files.
This commit restores all missing files from pre-rebase ref 98933f5e
while preserving post-rebase additions (night-scheduler, night-mode UI,
NightModeWidget dashboard integration).
Restored features include:
- AI Module Sidebar (FAB), OCR Labeling, OCR Compare
- GPU Dashboard, RAG Pipeline, Magic Help
- Klausur-Korrektur (8 files), Abitur-Archiv (5+ files)
- Companion, Zeugnisse-Crawler, Screen Flow
- Full backend, studio-v2, website, klausur-service
- All compliance SDKs, agent-core, voice-service
- CI/CD configs, documentation, scripts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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