mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-09 12:17:13 +00:00
Every stack answered to *.infinito.test, and the host resolver pointed that zone at 127.0.0.1, so a worktree's stack on its own bind IP could not be opened in a browser while the primary stack existed. INFINITO_DOMAIN is now derived per checkout: main.infinito.test for the primary one, and for a linked worktree its branch, lowercased with everything outside a-z0-9_- turned into "-", below INFINITO_DNS_DOMAIN (feature/store-i18n -> feature-store-i18n.infinito.test). The branch is read from the worktree's gitdir HEAD instead of running git, because git refuses the mounted checkout inside the stack container. GitHub and act runs keep the static default, custom.env still wins. The handler overrides the caller's value on purpose: inside the stack container that value is the previous .env, which make setup rewrote on every deploy, so the old domain kept feeding itself back into the next compose up. make network-dns-setup routes each stack's domain to the INFINITO_BIND_IP in that checkout's .env, with a local= line so AAAA answers NODATA instead of the primary stack's ::1. It skips domains outside the base zone, which a stale .env still carries, and fails when two checkouts claim one domain. worktree-up prints the domain and the follow-up command. Existing checkouts switch after make dotenv-force and a redeploy. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
DNS Helpers
This directory holds DNS helpers used during development and environment preparation. The folder contains the local name-resolution setup and teardown logic used during development and environment preparation. For the canonical Make target index that invokes these helpers, see make.md.
Areas
- setup/ for DNS setup scripts
remove.shfor DNS teardowncommon.shfor shared DNS variables and helper functions
Notes
- Canonical domains and aliases come from
roles/*/meta/server.yml - The CLI entrypoint lives in
cli/meta/domains/__main__.py - The reusable generator logic lives in
utils/domains/list.py DOMAIN_PRIMARYis rendered before the list is emitted- The DNS fallback calls the generator with
--alias --www INFINITO_DNS_HOSTScan still override the generated list explicitly