Stage 16: deploy infra & test contour #17
Reference in New Issue
Block a user
Delete Branch "feature/stage-16-deploy-test-contour"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Stage 16 — Deploy infra & test contour
Builds the test contour and the deploy machinery.
go:embed) and serves the SPA at/and/telegram/(a node stage in the gateway image bakes in the real build).deploy/docker-compose.yml: backend + gateway + Postgres + Telegram connector (VPN sidecar) + OTel Collector + Prometheus (15d) + Tempo (72h) + Grafana, fronted by a caddy that owns a single/_gmBasic-Auth (admin console + Grafana sub-path). Inter-service on a private network; only caddy on the externaledge. The connector-scoped compose is retired.accounts_created_total{kind}(robots excluded) and an in-memory gatewayactive_users{window=24h,7d}gauge..gitea/workflows/ci.yaml(unit/integration/ui+ a gateddeploy) on the newfeature/* -> development -> mastermodel; deploy auto-rolls the test contour on a PR into / push todevelopment.Verified locally:
gofmt/vet/buildclean, full unit + integration (testcontainers Postgres) green, both images build, compose/caddy/otelcol/prometheus configs validated.Owner setup the
deployjob needs before it can go greenTEST_secrets/variables in Gitea (seedeploy/.env.example): secretsTEST_POSTGRES_PASSWORD,TEST_AWG_CONF,TEST_GM_BASICAUTH_HASH(caddy hash-passwordbcrypt),TEST_GRAFANA_ADMIN_PASSWORD,TEST_TELEGRAM_BOT_TOKEN_EN/_RU; varsTEST_TELEGRAM_MINIAPP_URL,TEST_TELEGRAM_GAME_CHANNEL_ID_EN/_RU,TEST_VITE_*,TEST_CADDY_SITE_ADDRESS(:80),TEST_GRAFANA_ROOT_URL.<test domain> -> scrabble:80on the runner host (the in-compose caddy'sedgealias isscrabble).Tests · Go / test+Tests · Integration / integrationtoCI / unit,CI / integration,CI / ui(old names will never report). Decide whetherdevelopmentis protected too.- backend + gateway multi-stage distroless Dockerfiles; the gateway embeds and serves the SPA at / and /telegram/ via go:embed (committed dist placeholder, real build baked in by the image's node stage) - deploy/docker-compose.yml: backend + gateway + Postgres + Telegram connector (VPN sidecar) + OTel Collector + Prometheus (15d) + Tempo (72h) + Grafana, fronted by a caddy owning a single /_gm Basic-Auth (admin console + Grafana subpath); inter-service on a private network, only caddy on the edge network - new metrics: backend accounts_created_total{kind} (robots excluded) and an in-memory gateway active_users{window=24h,7d} gauge - CI: single .gitea/workflows/ci.yaml (unit/integration/ui + a gated test-contour deploy) on the new feature/* -> development -> master branch model; the old go-unit/integration/ui-test workflows are folded in; the connector-scoped compose is retired (superseded by deploy/) - docs: ARCHITECTURE §11/§12/§13, root + gateway READMEs, CLAUDE.md branching, PLAN.md (stage 16 done + refinements + Stage 17 forward-notes)CI on
8700fbf:unit/integration/uiare green — the code is validated.The
deployjob fails as expected (not a code issue): the runner job aborts atdocker composeinterpolation —required variable TELEGRAM_MINIAPP_URL is missing— because theTEST_Gitea secrets/variables are not set yet. Thedeployjob itself ran (so the auto-deploy trigger is wired correctly); it will go green once the owner setup in the PR description is in place (theTEST_set, the host-caddyscrabble:80route, and the renamed branch-protection checksCI / unit|integration|ui).