Math GDD portal deployment

The site is an immutable nginx image discovered by the VPS chow-sites service through Docker labels. Do not add a Caddy block. math-gdd-dev is a DEV host and is public without basic authentication.

Local verification

corepack enable
pnpm install --frozen-lockfile
pnpm check
docker build -t math-gdd:test .

CI path

Every pipeline runs check. On main, build:image pushes both the immutable short SHA and the mutable convenience tag main; deploy always consumes the short SHA. The eligible runner is the instance runner chow-tools-runner, so every job requires tags: [tools].

The compose project and container name are fixed:

project:   math-gdd
container: math-gdd-1
host:      https://math-gdd-dev.chowchowhome.duckdns.org

After a first deployment, label discovery may take up to 60 seconds. The first TLS request can fail while Caddy obtains the certificate; wait ten seconds and retry before diagnosing the service.

Inspection

docker inspect -f '{{.Image}}' math-gdd-1
docker logs --tail=100 math-gdd-1
docker run --rm --network web alpine:3.20 wget -q -O- http://math-gdd-1:8080/healthz
docker run --rm --network web alpine:3.20 wget -q -O /dev/null http://math-gdd-1:8080/flows/book-of-odin

Rollback

Use the immutable short SHA from a previously successful GitLab image job:

export MATH_GDD_IMAGE=git.chowchowhome.duckdns.org:5050/kiro/math-gdd
printf 'Previous successful short SHA: '
read -r MATH_GDD_TAG
export MATH_GDD_TAG
export CONTAINER_NAME=math-gdd-1
docker compose -p math-gdd -f deploy/docker-compose.yml pull
docker compose -p math-gdd -f deploy/docker-compose.yml up -d --remove-orphans
docker inspect -f '{{.Image}}' math-gdd-1

Rollback is complete only after the inspected image identity and both internal HTTP probes succeed.