The health router is mounted at prefix="/api" in domaindingo's main.py, so /health 404s. Checking it would have failed every deploy and rolled back a perfectly good image. Also adopts three conventions from the vault's DomainDingo Development note: recreate a single named service (--no-deps --force-recreate), validate with compose config --quiet before touching the running container, and write the rollback record in the documented format and location.
3.0 KiB
Hints
Short notes on things that were not obvious. Prune stale ones.
-
bin/cd-targetcannot be imported normally. The hyphen in the filename is not a valid Python identifier, sobin/cd-render-hooksloads it throughimportlib.machinery.SourceFileLoader. Importingimportlib.utilalone is not enough —importlib.machineryneeds its own import. -
if eval "$(cmd)"tests the wrong thing.evalreports the status of the string it evaluates, and an empty string is success — so a failingcmdmakes theiftake the true branch with nothing assigned, andset -uthen aborts on the first variable the branch reads. Capture first (if out="$(cmd)"; then eval "$out"). This had madecd-status's "host is not configured" message unreachable. -
docker/metadata-action'stype=sha,format=shortproduces 7 characters. That is whyimage_tag_templateuses{short7}. domaindingo'sbuild.ymlprefixes it with the branch, givingtest-sha-abc1234/prod-sha-abc1234. -
domaindingo's compose stacks are not in the domaindingo repo. Test and prod both live in
sysadmin/uas-ngatdocker/domaindingo/s5.fisher.hu/(docker-compose.ymlanddocker-compose-prod.yml). Thescripts/deploy-*.shfiles still in the application repo point at compose files that do not exist on s5 — they are dead code for both environments that matter. -
domaindingo test and prod both run on s5, not s2. Only dev is still on s2. The
hostname != s2guard in the old scripts therefore matched nothing andexit 0d, which reads as success. -
Registry tags in this fleet have drifted before.
domaindingo:0.1.149once resolved to a different image than the one running, with a broken/login. This is whycd-deploychecksorg.opencontainers.image.revisionand deploys by digest. -
docker compose down -vdestroys the data volumes for these stacks. The retired paradicsomleves test script used it.cd-deployonly ever runsup -d. -
domaindingo's health endpoint is
/api/health, not/health. The route is declared as/healthinsrc/domaindingo/api/status.py, butmain.pymounts the router withprefix="/api". Checking/healthgets a 404, which reads as a failed deploy and triggers a rollback. The vault's "DomainDingo Development" note is the authority here. -
The manual runbook recreates one service, not the project.
docker compose up -d --pull always --no-deps --force-recreate <service>.cd-deploymatches it (minus--pull always, since it has already pulled a pinned digest), so an automated deploy and a hand-run one converge on the same state. -
Rollback records are a documented convention.
<service>-rollback-<UTC timestamp>.envinbackup-test/backup-prod, holdingDD_ROLLBACK_IMAGE,DD_ROLLBACK_REVISION,DD_ROLLBACK_CAPTURED_AT.cd-deploywrites the same format in the same place, so an operator following the manual note can recover from an automated deploy.