Loading...
Loading...
Compare original and translation side by side
| Method | When to use | What happens |
|---|---|---|
| Project has a Dockerfile | Builds using the Dockerfile in the repo |
| No Dockerfile, or prefer auto-detection | Heroku-style buildpacks detect language and build automatically |
--root-dir--build-cmd--start-cmd| 方式 | 使用场景 | 执行逻辑 |
|---|---|---|
| 项目包含Dockerfile时 | 使用代码仓库中的Dockerfile进行构建 |
| 无Dockerfile,或偏好自动检测时 | 采用Heroku风格的buildpack自动检测语言并完成构建 |
--root-dir--build-cmd--start-cmdguara projects create --name my-appguara projects create --name my-appundefinedundefined
Creating a service does NOT trigger a build. Deploy separately after creation.
**Requires:** GitHub App installed. If not installed, the CLI will prompt with a link.
创建服务不会触发构建操作,需在创建完成后单独执行部署。
**注意:** 需要已安装GitHub App。若未安装,CLI会提示对应的安装链接。guara deploy # Deploy default branch
guara deploy --branch develop # Deploy specific branch
guara deploy --commit abc123f # Deploy specific commitguara deploy # 部署默认分支
guara deploy --branch develop # 部署指定分支
guara deploy --commit abc123f # 部署指定提交版本guara rollback # Interactive: pick from healthy deployments
guara rollback --deployment <id> # Direct rollback to specific deploymenthealthyguara rollback # 交互式选择:从健康的部署版本中选择回滚目标
guara rollback --deployment <id> # 直接回滚到指定ID的部署版本healthyguara services stop # Scale to zero replicas
guara services start # Restore to configured replicas
guara services restart # Rolling restart (zero downtime)
guara services delete # Permanent deletionguara services stop # 将副本数缩容至0
guara services start # 恢复至配置的副本数
guara services restart # 滚动重启(无停机)
guara services delete # 永久删除服务guara scale --autoscaling on # Enable autoscaling
guara scale --autoscaling off # Disable, use fixed replicasguara scale --autoscaling on # 开启自动扩容
guara scale --autoscaling off # 关闭自动扩容,使用固定副本数undefinedundefined
Domain status progresses: `pending` → `active` once DNS propagates and verification succeeds.
域名状态会经历:`pending`(待验证)→ `active`(已生效),该过程需等待DNS解析完成并通过验证。guara env set DATABASE_URL=postgres://...
guara env set KEY1=val1 KEY2=val2
guara env list
guara env unset KEYguara env set NPM_TOKEN=xxx --buildguara env set DATABASE_URL=postgres://...
guara env set KEY1=val1 KEY2=val2
guara env list
guara env unset KEYguara env set NPM_TOKEN=xxx --buildguara services infoguara deployments listguara services infoguara deployments list