efbaf657c6
- PLAN.md: new Stage 17 "Test-contour verification & defect fixes" (exercise the deployed contour end-to-end and fix what it surfaces — connector liveness check, path-conditional CI); the former prod-deploy stage becomes Stage 18. - Renumber every "Stage 17" prod-deploy reference to "Stage 18" across docs, compose, Caddyfile, ci.yaml and CLAUDE.md; the post-Stage-14 split range is now "Stages 15–18".
36 lines
1.1 KiB
Caddyfile
36 lines
1.1 KiB
Caddyfile
# Edge reverse proxy for the Scrabble contour. A single Basic-Auth gate covers
|
|
# every operator surface under /_gm (the backend-rendered admin console and the
|
|
# Grafana subpath); everything else (the SPA at / and /telegram/, plus the
|
|
# Connect edge) goes to the gateway. Mirrors ../galaxy-game's /_gm model.
|
|
#
|
|
# CADDY_SITE_ADDRESS is ":80" in the test contour (the host caddy terminates TLS
|
|
# and forwards); set it to a domain in prod (Stage 18) so this caddy does its own
|
|
# ACME and the contour is self-contained.
|
|
{
|
|
admin off
|
|
}
|
|
|
|
{$CADDY_SITE_ADDRESS::80} {
|
|
# Operator surfaces under /_gm: a single shared Basic-Auth, then route.
|
|
@gm path /_gm /_gm/*
|
|
handle @gm {
|
|
basic_auth {
|
|
{$GM_BASICAUTH_USER:gm} {$GM_BASICAUTH_HASH}
|
|
}
|
|
# Grafana serves from this sub-path (GF_SERVER_SERVE_FROM_SUB_PATH=true), so
|
|
# the prefix is forwarded intact, not stripped.
|
|
handle /_gm/grafana* {
|
|
reverse_proxy grafana:3000
|
|
}
|
|
# Everything else under /_gm is the backend-rendered admin console.
|
|
handle {
|
|
reverse_proxy backend:8080
|
|
}
|
|
}
|
|
|
|
# The SPA (/, /telegram/) and the Connect edge are served by the gateway.
|
|
handle {
|
|
reverse_proxy gateway:8081
|
|
}
|
|
}
|