Prompt file imported from RapidNative/orchd (
.claude/commands/local-domain.md). Fill in{{arguments}}before use. Copyright stays with the author.
Set up or inspect a local wildcard domain so orchd routes by Host locally the same way it does in production (Caddy -> gateway -> route table), instead of port-per-workload mapping.
Argument: {{arguments}} (a base domain like rnproject.test, or status / list).
Do this:
- If the argument is
statusorlist, just rundev/domain.sh statusand report it. Stop there. - Otherwise treat the argument as a base domain. If it's empty, ask which
domain to add (suggest
rnproject.test). - Run
dev/domain.sh statusfirst. If dnsmasq/Caddy aren't installed or the generated Caddyfile is missing, rundev/domain.sh setup— tell the user it needs sudo (ports 53/80/443,/etc/resolver) before running it. - Run
dev/domain.sh add <domain>. - Verify:
dig +short admin.<domain> @127.0.0.1returns127.0.0.1, andcurl -sS -o /dev/null -w '%{http_code}\n' https://api.<domain>/healthzanswers (502 is expected and fine when orchd isn't running yet). - Tell the user the three URLs (
admin.,api.,<key>.) and the command to start the stack against it:DOMAIN=<domain> dev/local.sh local.
Notes: certs come from the already-trusted mkcert local CA; one dnsmasq rule
covers the whole TLD, so a second base domain under .test needs no DNS change.