deploy.sh: honour TG_POST_DEPLOY on the compose path too
All checks were successful
PR build (required check) / changes (pull_request) Successful in 7s
secrets-guard / encrypted (pull_request) Successful in 6s
PR build (required check) / validate-observability (pull_request) Has been skipped
PR build (required check) / gate (pull_request) Successful in 1s
shell-lint / shellcheck (pull_request) Successful in 7s
PR build (required check) / build-backend (pull_request) Has been skipped
PR build (required check) / build-frontend (pull_request) Has been skipped

The per-environment gate on the post-deploy city warm and IndexNow ping was
added to deploy/stack/deploy-stack.sh but missed here, on the compose path --
which is the one environment where the default is wrong: dev.

Standing dev up on vps1 duly warmed city archives against the shared upstream
quota and submitted an IndexNow batch advertising http://10.10.0.2:8137, a mesh
address no crawler can reach. IndexNow rejected it (site verification), and the
warm was rate-limited after six cities, so the damage was small -- but only by
luck, and the warm was still running until the container was restarted.

Defaults to 1 when unset, so a checkout predating env-topology.sh keeps prod's
historical behaviour.
This commit is contained in:
Emi Griffith 2026-07-26 00:25:47 -07:00
parent 5c41ee4dad
commit c6150d07aa

View file

@ -417,7 +417,21 @@ docker images --format '{{.Repository}}:{{.Tag}}' \
# Post-deploy warm/IndexNow only make sense once the backend is (re)deployed -- # Post-deploy warm/IndexNow only make sense once the backend is (re)deployed --
# they exec inside the backend container. Skip them on a frontend-only roll. # they exec inside the backend container. Skip them on a frontend-only roll.
if [ "$SERVICE" = backend ] || [ "$SERVICE" = all ]; then #
# TG_POST_DEPLOY gates them per ENVIRONMENT (env-topology.sh): prod does both,
# beta and dev do neither. Both are wrong outside prod. The warm spends the
# shared upstream archive quota to fill a cache nobody serves from, and the
# IndexNow ping announces URLs to Bing/DuckDuckGo/Yandex — from dev that means
# submitting a mesh address no crawler can reach.
#
# This gate existed in deploy/stack/deploy-stack.sh (beta, prod) but was missed
# here, on the compose path, which is the ONE environment where the default is
# wrong: dev. Standing dev up on vps1 duly warmed 1000 cities and tried to
# submit 14,007 URLs to IndexNow before this was fixed.
#
# Defaults to 1 when unset so a checkout predating env-topology.sh keeps prod's
# historical behaviour.
if { [ "$SERVICE" = backend ] || [ "$SERVICE" = all ]; } && [ "${TG_POST_DEPLOY:-1}" = 1 ]; then
warm_city_archives warm_city_archives
ping_indexnow ping_indexnow
fi fi