The mesh builds the game from this repository and a commit (novox/hq ADR
0069); registry-api.novox.be, where HAL's image came from, is retired, so
the running container can no longer be re-pulled. The HAL module.yml,
docker-compose.yml and migrations/ beside this manifest retire with HAL.
The score database is a postgres-database grant: host, port, login and
database come from the binding (in a file the container reads as its
environment), the password from a 0600 file named by
TXT_GAME_DB_PASSWORD_FILE (ADR 0086). TXT_GAME_DB_PASSWORD still works,
so HAL's deployment keeps running if it is rebuilt from main.
The app now creates its schema when the database has none. HAL's
provisioning migrations did that as the admin and then granted the app's
login; under the mesh the app's own login owns its database, so the app
makes its tables itself. A database that already has both tables - HAL's
or one restored from it - is left exactly as it is.
The base is node 22.23.2-alpine3.24 by digest, the image the running one
was built on (its base layers match).
Verified: the manifest parses on mesh-controller main and #149 and
renders for a zurag.be node. Built from this commit, against throwaway
postgres: on an empty granted database it creates both tables (owned by
the granted login) and records a game; on a HAL-shaped database (tables
owned by postgres, grants to the old login, password in the environment)
it plays and creates nothing; and a pg_dump/pg_restore --no-owner copy of
that database into a fresh granted one keeps every row (counts and md5
identical), is owned by the grant, and keeps taking games.
Introduces a long-lived `pid` cookie (365 d) as persistent player identity
alongside the existing 24 h `sid` session cookie.
On first visit, a player row is upserted into `players`. On round end, a
transaction inserts into `games` and updates aggregates (best_attempts on wins
only, streak counters, last_played_at). DB failures are caught and logged —
the game keeps serving.
Adds a 3×2 'Your best' stats panel and a public top-10 scoreboard (fewest
best_attempts ASC, earliest last_played_at as tie-breaker; identifiers
truncated to 8 chars; current player highlighted).
Infrastructure: adds `pg` dependency, Dockerfile now installs npm deps before
copying server.mjs, docker-compose forwards all provisioned TXT_GAME_DB_*
vars and joins the postgres_postgres network for container-to-container reach.
Task: d1c49d59-57bd-4eba-9e22-f25a04157ad4
Number guessing game (1-100, 7 attempts) as a HAL custom-app module.
Serves HTML form UI with per-session state via cookie, no npm deps.
Traefik labels for txt.${DOMAIN} on websecure with letsencrypt TLS.