Serve the Partner Radar demo at radar.DOMAIN
Test and deploy / test (push) Successful in 2m36s
Test and deploy / deploy (push) Successful in 44s
Weekly Maintenance / maintenance (push) Successful in 7m17s
Renovate / renovate (push) Successful in 8m7s

A new Caddy site proxies radar.DOMAIN to radar-web:80, the web container of
the adamf/cto stack, which joins app-network from its own compose project.
It has its own rate-limit zones (radar, radar_login) and answers 503
"offline" when that stack is down. The name is added to Caddy's network
aliases and cloudflared's extra_hosts like www.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-11-19 15:50:22 +00:00
co-authored by Claude Opus 5.5
parent 30d6056bc0
commit b6baf9c1a2
5 changed files with 70 additions and 1 deletions
+46
View File
@@ -131,3 +131,49 @@ www.{$DOMAIN} {
}
}
}
# ---- Partner Radar (radar.DOMAIN) ----
# The adamf/cto "Partner Radar" demo: its own docker compose project on this
# host (`make stpvm` there), whose `web` container (its own Caddy, serving the
# React app and proxying its API) joins app-network as `radar-web`. A
# subdomain, not a /radar/ path, because the app assumes it owns `/` and its
# session cookie then stays apart from www's.
#
# No admin gate: the app has its own login and accounts. No security_headers
# either: the app's Caddy sends its own, and www's CSP would block the React
# app. Two zones of its own (see DEPLOYMENT.md §6): `radar` on every request,
# and `radar_login` on top of it for the login endpoint. radar_upstream lets
# `errors` answer "offline" when the stack is down instead of a bare 502.
(radar_proxy) {
reverse_proxy {$RADAR_UPSTREAM} {
import proxy
# Caddy's default, spelt out: when the stack is down, fail fast and
# let `errors` answer.
transport http {
dial_timeout 3s
}
}
}
radar.{$DOMAIN} {
import prod_tls
import common
header Strict-Transport-Security "max-age=63072000; includeSubDomains"
route {
import limit radar 30 1s
request_body {
max_size 10MB
}
vars radar_upstream yes
handle /api/auth/login {
route {
import limit radar_login 5 1m
import radar_proxy
}
}
handle {
import radar_proxy
}
}
}