Files
usaco/site/docker-compose.yml
T
adamfandClaude Opus 5.5 63608f130c
Test and publish the site / test (push) Successful in 2m4s
Test and publish the site / publish (push) Successful in 1m44s
Review recorded explanations of a solution on the site
The admin can upload a recording of themselves explaining a problem's
solution out loud (mp3, m4a, wav, webm, ogg or flac, up to 25 MB) and
get interview-style feedback, committed as reviews/<id>.md so every
attempt is kept.

Claude can't take audio, so the recording is transcribed first by an
OpenAI-compatible endpoint (whisper-1 by default; TRANSCRIBE_API_KEY,
with TRANSCRIBE_URL for a self-hosted server). Pace, pauses, filler
words and when complexity first comes up are measured from the word
timestamps and given to Claude with the timestamped transcript, the
statement and optionally the code. The reply covers the verdict, scores
in five areas, the approach and its complexity, missed edge cases,
delivery and what to work on.

Recordings are kept for playback in an S3 bucket (Garage) when the
S3_* settings are given, and are thrown away otherwise. Reviews are
admin-only. The job runs in the background like Explain, and the
statement fetch and save-error handling are now shared between the two.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 01:56:55 +01:00

45 lines
1.6 KiB
YAML

# Standalone development: the site serving THIS checkout's problems, with no
# login (AUTH_MODE=dev, everyone is the admin). http://localhost:8080/usaco/
#
# docker compose up --build
#
# The repo root is mounted read-only at /seed and cloned from there, and
# GIT_PUSH=false keeps edits made in the browser as commits in the
# container's own clone (docker compose exec usaco git -C /data/repo log),
# so nothing here can touch your working tree or the real remote. Only
# committed work shows up: it is a clone, not the working tree.
#
# This is NOT how it runs in production. There it is one service in the main
# site's docker-compose.yml, behind its nginx, cloning from Gitea and
# borrowing the site's login; see README.md.
services:
usaco:
build: .
ports:
- "8080:8080"
environment:
DEV_MODE: "true"
AUTH_MODE: dev
GIT_REMOTE_URL: file:///seed
GIT_PUSH: "false"
# The checkout belongs to your host user, which git refuses to read
# from as a different uid unless told it is safe.
GIT_CONFIG_COUNT: "1"
GIT_CONFIG_KEY_0: safe.directory
GIT_CONFIG_VALUE_0: "*"
# From your shell or a .env next to this file; blank turns the
# Explain button off.
CLAUDE_API_KEY: ${CLAUDE_API_KEY:-}
CLAUDE_MODEL: ${CLAUDE_MODEL:-}
# Recording reviews also need a transcriber. No S3 here, so
# recordings are not kept.
TRANSCRIBE_API_KEY: ${TRANSCRIBE_API_KEY:-${OPENAI_API_KEY:-}}
TRANSCRIBE_URL: ${TRANSCRIBE_URL:-}
TRANSCRIBE_MODEL: ${TRANSCRIBE_MODEL:-}
volumes:
- ..:/seed:ro
- usaco-data:/data
volumes:
usaco-data: