Initial Meterbox commit with boot disk usage metric.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
JamesandCursor committed 2026-09-19 02:45:52 +00:00
commit 4e44204d9b
55 files changed
+12104

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT"
DOCKER=(docker)
if ! docker info >/dev/null 2>&1; then
DOCKER=(sudo docker)
fi
"${DOCKER[@]}" compose build "$@"
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT"
DOCKER=(docker)
if ! docker info >/dev/null 2>&1; then
DOCKER=(sudo docker)
fi
"${DOCKER[@]}" compose down
echo "meterbox stopped"
Executable
+4
View File
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail
# Supported runtime is Docker only. See scripts/up.sh.
exec "$(cd "$(dirname "$0")" && pwd)/up.sh"
Executable
+27
View File
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT"
DOCKER=(docker)
if ! docker info >/dev/null 2>&1; then
DOCKER=(sudo docker)
fi
echo "==> iptables snapshot (pre)"
sudo iptables -L -n -v | head -40 || true
echo "==> building & starting meterbox (Docker, localhost-only)"
"${DOCKER[@]}" compose up -d --build
echo "==> published / listening check"
ss -tlnp | grep 8787 || true
"${DOCKER[@]}" compose ps
echo "==> health"
sleep 2
curl -sf http://127.0.0.1:8787/api/health
echo
curl -sf http://127.0.0.1:8787/api/health | grep -q '"ok":true'
echo "Meterbox up at http://127.0.0.1:8787 (127.0.0.1 only)"