zeabur-update-service
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseZeabur Update Service Without Redeploy
无需重新部署即可更新Zeabur服务
Always useto invoke Zeabur CLI. Never usenpx zeabur@latestdirectly or any other installation method. Ifzeaburis not available, install Node.js first.npx
请始终使用调用Zeabur CLI。 切勿直接使用npx zeabur@latest或其他任何安装方式。如果没有zeabur,请先安装Node.js。npx
Workflow
操作流程
bash
undefinedbash
undefined1. Get service ID (use the zeabur-service-list
skill)
zeabur-service-list1. 获取服务ID(使用zeabur-service-list
技能)
zeabur-service-listnpx zeabur@latest service list --project-id <project-id> -i=false
npx zeabur@latest service list --project-id <project-id> -i=false
2. Check current variables
2. 查看当前变量
npx zeabur@latest variable list --id <service-id> -i=false
npx zeabur@latest variable list --id <service-id> -i=false
3a. Add new variables (errors if key already exists)
3a. 添加新变量(若键已存在则报错)
npx zeabur@latest variable create --id <service-id>
--key "KEY1=value1"
--key "KEY2=value2"
-i=false -y
--key "KEY1=value1"
--key "KEY2=value2"
-i=false -y
npx zeabur@latest variable create --id <service-id>
--key "KEY1=value1"
--key "KEY2=value2"
-i=false -y
--key "KEY1=value1"
--key "KEY2=value2"
-i=false -y
3b. Update existing variables (only updates specified keys)
3b. 更新现有变量(仅更新指定的键)
npx zeabur@latest variable update --id <service-id>
--key "KEY1=new_value1"
-i=false -y
--key "KEY1=new_value1"
-i=false -y
npx zeabur@latest variable update --id <service-id>
--key "KEY1=new_value1"
-i=false -y
--key "KEY1=new_value1"
-i=false -y
4. Restart service (use the zeabur-restart
skill for details)
zeabur-restart4. 重启服务(详情请使用zeabur-restart
技能)
zeabur-restartnpx zeabur@latest service restart --id <service-id> -y -i=false
undefinednpx zeabur@latest service restart --id <service-id> -y -i=false
undefinedCaveats
注意事项
| Issue | Solution |
|---|---|
| Set in Dashboard, not CLI (shell expands to empty) |
| 问题 | 解决方案 |
|---|---|
| 在控制台中设置,不要使用CLI(shell会将其展开为空值) |
Update Image Tag (Upgrade Service Version)
更新镜像标签(升级服务版本)
For prebuilt/marketplace services, update the image tag to upgrade to a newer version.
对于预构建/市场服务,可通过更新镜像标签升级至新版本。
Workflow
操作流程
bash
undefinedbash
undefined1. Get service ID (use the zeabur-service-list
skill)
zeabur-service-list1. 获取服务ID(使用zeabur-service-list
技能)
zeabur-service-listnpx zeabur@latest service list --project-id <project-id> -i=false
npx zeabur@latest service list --project-id <project-id> -i=false
2. Update tag (triggers redeploy automatically)
2. 更新标签(会自动触发重新部署)
npx zeabur@latest service update tag --id <service-id> -t <new-tag> -y -i=false
undefinednpx zeabur@latest service update tag --id <service-id> -t <new-tag> -y -i=false
undefinedFlags
标识参数
| Flag | Description |
|---|---|
| Service ID (required, do not use |
| New image tag to deploy |
| Environment ID (optional, resolved automatically) |
| Skip confirmation |
Note: Updating the tag triggers a new deployment. The service will restart with the updated image.
| 参数 | 说明 |
|---|---|
| 服务ID(必填,请勿使用 |
| 要部署的新镜像标签 |
| 环境ID(可选,会自动解析) |
| 跳过确认步骤 |
注意: 更新标签会触发新的部署。服务将使用更新后的镜像重启。
When to Use
使用场景
- Fix environment variable typos
- Add missing config
- Change ports, URLs, credentials
- Upgrade a prebuilt service to a newer version
- No need to redeploy entire template
- 修复环境变量输入错误
- 添加缺失的配置
- 修改端口、URL、凭证信息
- 将预构建服务升级至新版本
- 无需重新部署整个模板