taubyte-local-host-launch
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLocal Host Launch
本地主机启动
When to use
使用场景
Use this skill after domain/resource creation in Dream/local when the goal is to:
- access website/function endpoints by FQDN
- open resources in browser using hostnames
- validate host-based routing
当在Dream/本地环境中创建域名/资源后,若需要完成以下目标,可使用本Skill:
- 通过FQDN访问网站/函数端点
- 使用主机名在浏览器中打开资源
- 验证基于主机的路由
Prerequisites
前置条件
taubyte-dream-local-operationstaubyte-hosts-file-editor
taubyte-dream-local-operationstaubyte-hosts-file-editor
Steps
步骤
- Confirm Dream and universe are running:
bash
dream status universe default - Get FQDN(s) from domain resources:
bash
tau query domain --name <domain-name> - Ensure hosts mappings exist for each FQDN:
127.0.0.1 <fqdn>- run automatically (do not wait for user prompt)
taubyte-hosts-file-editor
- Ensure local deploy trigger is executed for Dream/local:
bash
docker info dream inject push-all --universe default- if fails, stop and report Docker as runtime blocker
docker info
- if
- Discover serving port:
- Usually from substrate:
bash
dream status substrate - If gateway is used in the universe, use its HTTP port from .
dream status universe <name>
- Usually from substrate:
- Validate by hostname:
bash
curl "http://<fqdn>:<port>/<path>" - If hosts edit is not available, fallback validation:
bash
curl --resolve "<fqdn>:<port>:127.0.0.1" "http://<fqdn>:<port>/<path>" - For browser launch:
- open
http://<fqdn>:<port>/<path>
- open
- 确认Dream和universe正在运行:
bash
dream status universe default - 从域名资源中获取FQDN:
bash
tau query domain --name <domain-name> - 确保每个FQDN都存在hosts映射:
127.0.0.1 <fqdn>- 自动运行(无需等待用户提示)
taubyte-hosts-file-editor
- 确保为Dream/本地环境执行了本地部署触发命令:
bash
docker info dream inject push-all --universe default- 若执行失败,停止操作并报告Docker是运行时障碍
docker info
- 若
- 发现服务端口:
- 通常从substrate获取:
bash
dream status substrate - 若universe中使用了网关,则从获取其HTTP端口。
dream status universe <name>
- 通常从substrate获取:
- 通过主机名验证:
bash
curl "http://<fqdn>:<port>/<path>" - 若无法编辑hosts,使用备用验证方式:
bash
curl --resolve "<fqdn>:<port>:127.0.0.1" "http://<fqdn>:<port>/<path>" - 浏览器启动方式:
- 打开
http://<fqdn>:<port>/<path>
- 打开
Output contract
输出约定
- Always return:
- exact website URL(s),
- exact function URL(s),
- one ready-to-run curl per endpoint,
- whether hosts mapping was auto-applied or requires manual admin edit.
- 始终返回:
- 准确的网站URL(s),
- 准确的函数URL(s),
- 每个端点对应的可直接运行的curl命令,
- 说明hosts映射是自动应用还是需要手动管理员编辑。
Notes
注意事项
- Hosts mappings are OS-level and affect browser resolution.
- is request-scoped and does not modify system DNS.
curl --resolve - For HTTPS tests, prefer so hostname/SNI stays correct.
--resolve - Do not introduce unless the user explicitly asks for a prefix.
--generated-fqdn-prefix - If a function was created with , ensure
--template emptyis implemented before launching local tests.empty.go
- Hosts映射是操作系统级别的,会影响浏览器的域名解析。
- 仅作用于当前请求,不会修改系统DNS。
curl --resolve - 对于HTTPS测试,优先使用以保证主机名/SNI正确。
--resolve - 除非用户明确要求前缀,否则不要引入。
--generated-fqdn-prefix - 若函数是使用创建的,需确保
--template empty已实现,再启动本地测试。empty.go