webhook.py: HMAC-signed receiver (X-Gitea-Signature), validates ref==main, one-concurrent-deploy lock, no request data reaches shell. deploy-webhook.sh: installs llm-bench-webhook systemd service (runs as aygea, in docker group), generates + stores secret in .webhook.secret. deploy.sh: port read from compose (now 31415). Installed on mewtwo: listening 0.0.0.0:41798, enabled for boot. Gitea webhook target: http://10.0.0.22:41798/hook Co-Authored-By: Claude <noreply@anthropic.com>
29 lines
1.1 KiB
Bash
Executable File
29 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Deploy the benchmark dashboard via docker compose.
|
|
# ./deploy.sh -> regenerate site from source, rebuild, restart
|
|
# ./deploy.sh logs -> tail container logs
|
|
# ./deploy.sh down -> stop & remove container
|
|
# ./deploy.sh status -> show running state
|
|
#
|
|
# The site rebuilds from data/benchmark_history.json on every run, so just
|
|
# add a grade to the JSON, then run this. Bound to 0.0.0.0:8081 — point
|
|
# Netbird (or any reverse proxy) at http://<this-host>:8081 for HTTPS/subdomain.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")"
|
|
|
|
case "${1:-up}" in
|
|
up)
|
|
# --build forces a rebuild so new grades/code take effect
|
|
docker compose up -d --build
|
|
echo
|
|
PORT=$(grep -oP '0\.0\.0\.0:\K[0-9]+' docker-compose.yml | head -1)
|
|
HOSTIP=$(hostname -I 2>/dev/null | awk '{print $1}' || echo localhost)
|
|
echo "✓ dashboard up: http://${HOSTIP}:${PORT}/dashboard.html"
|
|
echo " (bind 0.0.0.0:${PORT} -> container :80)"
|
|
;;
|
|
logs) docker compose logs -f --tail=100 ;;
|
|
down) docker compose down ;;
|
|
status) docker compose ps ;;
|
|
*) echo "usage: $0 [up|logs|down|status]"; exit 1 ;;
|
|
esac
|