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://<host>:8081. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -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://<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
|
||||
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
|
||||
@@ -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.)
|
||||
Reference in New Issue
Block a user