3.5 KiB
3.5 KiB
Doris Schoolhouse Deployment Notes
Intended runtime shape on NOMAD
Doris Schoolhouse should run as a standalone NOMAD service from /opt/doris-schoolhouse.
- Repo/source path:
/home/fizzlepoof/repos/truenas-stacks/home/doris-schoolhouse - Live runtime path:
/opt/doris-schoolhouse - Persistent app data:
/opt/doris-schoolhouse/data - Published app port:
8091 - Workspace mount for D2L snapshot input:
/home/fizzlepoof/.openclaw/workspace:/workspace/.openclaw-workspace:ro
Important NOMAD networking note
NOMAD does not currently have PD's Docker-only external networks (pangolin, ix-databases_shared-databases).
For NOMAD, Schoolhouse should:
- publish
8091on the host - let Pangolin/Newt target the host port externally
- reach shared Postgres on PD over LAN TCP (
10.5.30.6:5432) - reach LiteLLM / Qdrant / Paperless / n8n over their existing LAN/public endpoints
Pre-deploy checklist
- Copy the repo source into
/opt/doris-schoolhouse. - Create a real
.envfrom.env.nomad.example. - Replace placeholder values for:
SESSION_SECRETDATABASE_URLpasswordPAPERLESS_API_TOKEN
- Ensure the shared Postgres target database/user exist on PD.
- Apply
app/db/schema.sqlagainst theschoolhousedatabase. - Ensure
/opt/doris-schoolhouse/dataexists and is writable by Docker. - Confirm Pangolin/Newt has a resource forwarding
schoolhouse.paccoco.comto NOMAD host port8091if public access is wanted immediately.
Current live integration status
Working
- Assignment intake webhook (
/webhook/school/intake/upload) succeeded in live smoke testing on 2026-05-15. - Recording workflow (
/webhook/class/upload) was repaired live on 2026-05-15 and now returns HTTP 200. - Direct Whisper transcription endpoint on NOMAD succeeded in live smoke testing.
- LiteLLM
mediumon PD succeeded after its Ollama route was fixed.
Suggested deploy flow
sudo mkdir -p /opt/doris-schoolhouse/data
sudo rsync -a --delete --exclude '.env' --exclude 'data/' /home/fizzlepoof/repos/truenas-stacks/home/doris-schoolhouse/ /opt/doris-schoolhouse/
cd /opt/doris-schoolhouse
sudo cp .env.nomad.example .env
# edit .env
sudo docker compose --env-file .env config
sudo docker compose --env-file .env up -d --build
Post-deploy verification
curl -fsS http://127.0.0.1:8091/api/health
curl -fsS http://127.0.0.1:8091/api/health/details
curl -fsS http://127.0.0.1:8091/api/dashboard/summary
Then verify:
- D2L snapshot counts load
- assignment intake confirms into n8n/Paperless
- recording conversion works inside container
- recording downstream workflow returns success
- browser uploads return to
/assignments/uploadwith a success notice instead of rendering raw JSON - programming-class uploads create one
source_bundlesubmission and immediately queue the Paperless receipt upload
Serenity backup on NOMAD
If Schoolhouse submission bundles should survive a NOMAD disk problem, back up /opt/doris-schoolhouse/data to Serenity.
Current live helper:
/opt/doris-schoolhouse/bin/backup-to-serenity.sh
Behavior:
- mounts Serenity NFS export
10.5.30.5:/mnt/user/dataat/mnt/serenity-datawhen needed - mirrors
/opt/doris-schoolhouse/data/into/mnt/serenity-data/backups/nomad/doris-schoolhouse/data/ - writes
last_success_utc.txtandsource_host.txtmarkers beside the mirrored data
Suggested cron on NOMAD:
40 2 * * * /opt/doris-schoolhouse/bin/backup-to-serenity.sh >> /opt/doris-schoolhouse/logs/backup-to-serenity.log 2>&1