bonus-edge-proxy/README_DEPLOY.md

61 lines
1.2 KiB
Markdown
Raw Permalink 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.

部署操作手册 (Deployment Guide)
1. 准备工作 (Setup)
1.1 文件位置
确保以下文件在 Git 仓库的根目录:
.drone.yml (流水线定义)
docker-compose.prod.yml (生产环境运行配置)
mediamtx.yml (如果需要)
1.2 Drone 配置 (Secrets)
登录 Drone 网页版 -> Settings -> Secrets添加以下变量
gitea_username: Gitea 用户名
gitea_password: Gitea 密码
edge_host_ip: RK3588 的 IP 地址 (如 192.168.0.123)
edge_user: RK3588 用户名 (如 dev)
edge_password: RK3588 密码
1.3 RK3588 权限准备
在 RK3588 上执行一次:
sudo mkdir -p /opt/edge-proxy
sudo chown -R forlinx:forlinx /opt/edge-proxy
2. 如何触发部署 (How to Deploy)
因为我们在 .drone.yml 里设置了 trigger: event: [ tag ],所以普通的 git push 不会 触发部署,只会触发编译(如果有另外的 push 事件配置的话)。
要发布新版本到设备上,请执行:
# 1. 提交修改
git add .
git commit -m "update config"
git push
# 2. 打标签 (Tag) - 这就是开关!
git tag v1.0.0
git push origin v1.0.0
Drone 检测到 v1.0.0 这个标签被推送,就会开始干活:
编译 Docker 镜像。
登录 RK3588。
上传最新的 docker-compose.prod.yml。
拉取镜像并重启容器。