From 7db45049dc6fa08fa7bc58cbf99b467238ef003e Mon Sep 17 00:00:00 2001 From: aygea Date: Tue, 28 Jul 2026 14:11:47 -0700 Subject: [PATCH] Add docker-compose + deploy.sh (Coolify replacement) Run on mewtwo: bound 0.0.0.0:8081 -> nginx :80. Rebuilds site from source on every 'deploy.sh up' so new grades flow through without Coolify. Point Netbird at http://:8081. Co-Authored-By: Claude --- deploy.sh | 26 ++++++++++++++++++++++++++ docker-compose.yml | 13 +++++++++++++ 2 files changed, 39 insertions(+) create mode 100755 deploy.sh create mode 100644 docker-compose.yml diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..c7149b1 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,26 @@ +#!/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://: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 + echo "✓ dashboard up: http://$(hostname -I 2>/dev/null | awk '{print $1}' || echo localhost):8081/dashboard.html" + echo " (bind 0.0.0.0:8081 -> 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 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..e917953 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,13 @@ +services: + benchmark: + # Builds from the repo's Dockerfile: + # stage 1 (python) runs generate_dashboard.py from data/benchmark_history.json + # stage 2 (nginx) serves dashboard.html + pages/ as static + build: . + image: llm-benchmark:latest + container_name: llm-benchmark + restart: unless-stopped + ports: + - "0.0.0.0:8081:80" # bind all interfaces:8081 -> container :80 + # Re-tag the image so `docker compose up` after a code change rebuilds it. + # (compose detects Dockerfile/context changes and rebuilds automatically.)