Align API container UID with host and harden RTSP slice readiness.
Run compose api as HOST_UID/GID with cache under /tmp, poll slice files for ready_event when ffmpeg stderr is silent, invoke batch via venv python, exclude logs from build context, and document Docker cache/VLC troubleshooting. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
19
backend/scripts/rebuild-api-image.sh
Executable file
19
backend/scripts/rebuild-api-image.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
# Clear BuildKit cache and rebuild the API image (fixes corrupted layer / unpigz errors).
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
echo "Pruning BuildKit cache..."
|
||||
docker builder prune -af
|
||||
docker buildx prune -af 2>/dev/null || true
|
||||
docker rmi -f backend-api:latest 2>/dev/null || true
|
||||
|
||||
if [[ "${RESTART_DOCKER:-0}" == "1" ]]; then
|
||||
echo "Restarting Docker..."
|
||||
sudo systemctl restart docker
|
||||
fi
|
||||
|
||||
echo "Building api image (--no-cache)..."
|
||||
docker compose build api --no-cache
|
||||
|
||||
echo "Done. Recreate container: docker compose up -d --force-recreate api"
|
||||
Reference in New Issue
Block a user