Files
wind_power_cal/.agents/skills/wind-deploy/SKILL.md
T
cloud 3cb7684039 更新项目 skills 并完善设计功率曲线前端
- skills: 移除 edge_collector 专属技能(OTA/协议/边缘主机/collector 等),
  保留通用工程规范(analyze-questions/cpp-coding-style/git-commit/shell-scripting/
  frontend-debug/frontend-dialog/frontend-ui-conventions),新增 wind_power_cal
  项目技能(wind-project-overview/build-run/deploy/backend-conventions/
  frontend-conventions/third-party-libs)与元技能 skill-builder;
  .agents/skills 与 .claude/skills 保持同步
- 前端: HomePage/App.css 增加设计功率曲线录入与图表展示

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-14 17:50:23 +08:00

37 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
name: wind-deploy
description: wind_power_cal 远端部署规范。用于把服务部署到公网主机(默认 82.157.83.226)时,按 deploy.sh 流程操作并校验 :8848。
---
# 远端部署(deploy.sh
当前 `deploy.sh` 只部署 wind_power 本身:**不**安装/配置 nginx**不**修改 gitea。
## 流程
1. 本地 `package.sh --build-type Release` 生成 `runtime/wind_power/`
2. rsync `runtime/wind_power/` → 远端 `~/wind_power/`
3. 安装/更新 systemd 服务 `wind_power.service`
- `User=ubuntu``ExecStart=~/wind_power/wind_server`
- `Environment=LD_LIBRARY_PATH=~/wind_power/libs`
- 日志 `logs/server.log``Restart=on-failure`
4. 重启 `wind_power`,校验 `localhost:8848`
## 远端运行期依赖(最小化服务器常缺)
`sudo apt-get install -y libjsoncpp25 libc-ares2`deploy.sh 已内置)。
> wind_server 链 Drogon 的传递依赖;本地 `package.sh` 只打包了 drogon/trantor 的 .sojsoncpp/c-ares 需远端 apt 提供。
## 用法
- 默认主机:`./deploy.sh`
- 指定主机:`./deploy.sh ubuntu@1.2.3.4`
- 仅本地打包不执行远端变更:`./deploy.sh --dry-run`
- 认证:脚本内置 `SSH_PASSWORD`,用 `sshpass` 非交互登录(如需改用环境变量,自行调整为 `sshpass -e` + `SSHPASS`)。
## 校验
```
curl -s localhost:8848/api/system/health
# {"status":0,"msg":"success","data":{"status":"ok"}}
```
查看服务:`ssh ubuntu@82.157.83.226 'systemctl status wind_power'`
> 若需经 nginx 反代 / 与 gitea 共存 / 改端口,需另行配置(当前 deploy.sh 不涉及,避免与远端已有 gitea 冲突)。