taubyte-resource-creation

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Resource Creation

资源创建

Preconditions

前置条件

  • taubyte-core-constraints
    loaded
  • taubyte-scope-routing
    completed
  • taubyte-project-and-application
    completed for project (and application only if the task required it — do not assume an application exists)
  • taubyte-context-log
    initialized
  • taubyte-build-runtime-config
    available for server-side config/build logic
  • 已加载
    taubyte-core-constraints
  • 已完成
    taubyte-scope-routing
  • 已为项目完成
    taubyte-project-and-application
    (仅当任务需要时才完成应用部分——请勿假设应用已存在)
  • 已初始化
    taubyte-context-log
  • taubyte-build-runtime-config
    可用于服务器端配置/构建逻辑

Order

执行顺序

  • Global / project-level resources first (domain, website, library) — no application step unless
    taubyte-scope-routing
    says otherwise.
  • Application-scoped resources next (database, storage, messaging, service, smartops, and function only when scoped to an application) — run
    tau select application
    only when that phase actually applies; do not create an application for website-only or simple global function work.
  • 先创建全局/项目级资源(域名、网站、库)——除非
    taubyte-scope-routing
    另有说明,否则不执行应用步骤。
  • 接下来创建应用作用域资源(数据库、存储、消息服务、服务、SmartOps,以及仅当作用域为应用时的函数)——仅当该阶段实际适用时才运行
    tau select application
    ;对于仅网站或简单全局函数的工作,请勿创建应用。

Rules

规则

  • Use default non-interactive mode unless user requested interactive.
  • For full flags, use
    taubyte-resource-flags-reference
    .
  • Use
    MSYS_NO_PATHCONV=1
    for path-like flags in Git Bash.
  • Never use
    --generated-fqdn-prefix
    unless the user explicitly asks for a specific prefix value.
  • If server-side config is needed, update
    .taubyte/config.yaml
    ; if env vars are needed, declare them in
    .taubyte/build.sh
    only (see
    taubyte-build-runtime-config
    ). Validate both before push.
  • For Go function implementation correctness, apply
    taubyte-go-sdk-constraints
    .
  • After creating a serverless function with
    --template empty
    , immediately edit the generated
    empty.go
    with a real implementation (do not leave scaffold code).
  • Website/library creation must use explicit repo strategy; never rely on implicit repo auto-selection.
  • Deterministic default for generated repos:
    • website:
      tb_code_<project>_<website>
    • library:
      tb_code_<project>_<library>
  • Immediately import after creation to sync local repository clone:
    • tau import website --name <site>
    • tau import library --name <lib>
  • Immediately verify bound repo fullname/ID in config yaml after creation/import; if mismatch, stop and fix before any push.
  • Update context log after every mutation.
  • 除非用户要求交互模式,否则默认使用非交互模式。
  • 如需完整标志,请使用
    taubyte-resource-flags-reference
  • 在Git Bash中,对类路径标志使用
    MSYS_NO_PATHCONV=1
  • 除非用户明确要求特定前缀值,否则绝不使用
    --generated-fqdn-prefix
  • 若需要服务器端配置,请更新
    .taubyte/config.yaml
    ;若需要环境变量,仅在**
    .taubyte/build.sh
    **中声明(参见
    taubyte-build-runtime-config
    )。推送前需验证这两项内容。
  • 为确保Go函数实现正确,请应用
    taubyte-go-sdk-constraints
  • 使用
    --template empty
    创建无服务器函数后,立即编辑生成的
    empty.go
    ,添加实际实现代码(请勿保留脚手架代码)。
  • 创建网站/库时必须使用明确的仓库策略;绝不依赖隐式仓库自动选择。
  • 生成仓库的确定性默认命名规则:
    • 网站:
      tb_code_<project>_<website>
    • 库:
      tb_code_<project>_<library>
  • 创建后立即导入以同步本地仓库克隆:
    • tau import website --name <site>
    • tau import library --name <lib>
  • 创建/导入后立即验证配置yaml中绑定的仓库全名/ID;若不匹配,在推送前停止操作并修复。
  • 每次变更后更新上下文日志。