- prompts/: LFU cache exam + 5-pillar grading rubric - outputs/: 8 model .py outputs (local + cloud baseline) - data/benchmark_history.json: graded results (scores, metrics, bugs, patches) - generate_dashboard.py: builds dashboard.html + pages/*.html from JSON - Dockerfile + DEPLOY.md: Gitea→Coolify deploy (build-step, nginx static) - .gitignore: generated HTML excluded (built on deploy) Co-Authored-By: Claude <noreply@anthropic.com>
2.6 KiB
Deploying to Coolify (via Gitea)
Repo: ssh://git@git.itsaygea.com:2222/admin/modelTesting.git
The generated dashboard.html and pages/ are gitignored — they're built from
data/benchmark_history.json by generate_dashboard.py. So Coolify must run that script
during build, then serve the result.
Option A — Build step, regenerate on every push (recommended)
The site always reflects the latest benchmark_history.json. Push a new grade → re-deploy → site updates.
Coolify service setup
-
New Resource → choose your Gitea project
admin/modelTesting. -
Choose "Dockerfile" as the build pack (we ship a tiny one).
Add this
Dockerfileto the repo (already included):# build stage: regenerate the site from source FROM python:3.12-slim AS build WORKDIR /app COPY . . RUN python3 generate_dashboard.py # serve stage: static files via nginx FROM nginx:alpine COPY --from=build /app/dashboard.html /usr/share/nginx/html/dashboard.html COPY --from=build /app/pages /usr/share/nginx/html/pages # root path redirects to the dashboard RUN printf 'location = / { return 302 /dashboard.html; }\n' > /etc/nginx/conf.d/default.conf EXPOSE 80 -
Port: set the published port to 80 (Coolify maps it to your domain).
-
Domain: attach your domain. Coolify provisions the HTTPS cert automatically.
-
Deploy. Push to
main→ Coolify rebuilds → site updates.
Why a Dockerfile
Coolify's "Nixpacks / static" presets can run a build command, but the Dockerfile path is the most predictable: explicit Python build step + nginx static serving, no surprises. The image is ~30 MB.
Option B — Pure static, commit the built HTML (simplest, no build)
If you'd rather not build on the server:
- Comment out
/dashboard.htmland/pages/in.gitignore. - Run
python3 generate_dashboard.pylocally, thengit add+ commit the HTML. - In Coolify: New Resource → the repo → build pack "Static Site" (or Nixpacks with
OUTPUT_DIRECTORY=/), publish dir/, port 80.
Downside: you must rebuild + commit locally every time you add a model. Use Option A unless your Coolify can't run Docker.
Verifying after deploy
Open the domain → you should land on the dashboard. If you see a blank page, check the
Coolify build logs for generate_dashboard.py errors (usually a malformed
data/benchmark_history.json).
Local preview before pushing
python3 generate_dashboard.py
python3 -m http.server 8000
# open http://localhost:8000/dashboard.html