3 Commits

Author SHA1 Message Date
gnezim 5273b3a7a6 setup-pve201: treat WAF 403 as warning, not fatal
The smoke test was getting 403 from the upstream WAF (rate-limit on
webzavod's egress IP). 403 doesn't indicate a tunnel/routing problem
— it confirms the egress IP IS the WAF-recognized one and is being
throttled. Don't abort the rest of setup over a transient throttle;
the only response that should hard-fail is HTTP 200 with HTML body
(WAF interstitial), which means the tunnel was bypassed.
2026-04-27 17:37:22 +03:00
gnezim b0e9aafed2 WAF rate-limit mitigation: nginx /api cache + Playwright throttle
(A) Add proxy_cache zone for ui-dashboard.gnerim.ru. /api/ caches 200 for
1m, /map/api/ for 24h. proxy_cache_use_stale serves cached content during
upstream errors (incl. 403 from WAF rate limit). proxy_cache_lock collapses
concurrent fetches for the same URI. Cache zone declared in conf.d/ (must
be in http{} context).

(B) Playwright workers=2, retries=2 in CI. Cuts the parallel burst that
trips the WAF before nginx cache warms up; retries handle the residual
flake.

setup-pve201.sh now installs the conf.d cache file and pre-creates the
cache dir with nginx-user ownership.
2026-04-27 16:40:44 +03:00
gnezim 894113e09d Add deployment/setup-pve201.sh — one-shot Phase B host bootstrap
Idempotent: installs systemd tunnel unit, smoke-tests it, writes the
nginx vhost + htpasswd, reloads nginx. Reads BASIC_AUTH_USER/PASS from
env (use sudo -E).
2026-04-27 12:06:32 +03:00