Add the usaco service and its /usaco/ route
Test and deploy / test (push) Successful in 2m14s
Test and deploy / deploy (push) Successful in 1m36s

The USACO practice log from the usaco repo's site/: one container, git
as its store (a clone in ./usaco-data), behind nginx with the prefix
kept, like /jobs/. Gitea may now deliver webhooks to it by name.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-14 21:49:48 +01:00
co-authored by Claude Opus 5.5
parent 1b5c8fc4a9
commit c5a722bd1e
6 changed files with 80 additions and 3 deletions
+24
View File
@@ -79,6 +79,8 @@
set $upstream_jobs http://jobs:8080;
# Likewise the activity tracker's.
set $upstream_tracker http://activity-tracker:8080;
# And the USACO site's.
set $upstream_usaco http://usaco:8080;
# ---- Backend API -----------------------------------------------------
# Two patterns repeat through every proxied location below:
@@ -365,6 +367,28 @@
proxy_set_header X-Forwarded-Proto $scheme;
}
# ---- USACO practice log (/usaco/) ----
# Its own container (the usaco repo's site/), shaped like /jobs/: SPA
# and API under one prefix that is NOT stripped, and no
# auth_request, because most of it is public and the app checks the
# session itself for the admin's edits. Gitea's push webhook does not
# come through here: it calls the container directly on the Docker
# network. ^~ so no regex location can claim a /usaco/ path.
location = /usaco {
return 301 /usaco/;
}
location ^~ /usaco/ {
limit_req zone=api burst=20 nodelay;
# An admin edit commits and pushes to Gitea before answering.
proxy_read_timeout 120s;
proxy_pass $upstream_usaco;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# ---- Activity tracker (/tracker/) ----
# Its own container (the adamf/ccp repo): an ingest API for device
# collectors, which send batches of events with a per-device bearer