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>
20 lines
574 B
Bash
Executable File
20 lines
574 B
Bash
Executable File
#!/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"
|