diff --git a/.gitignore b/.gitignore index 1d54b58..f7a4fe6 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ npm-debug.log .DS_Store *.log .idea/ +*.tar.gz +build/ diff --git a/README.md b/README.md index c59587e..f62b51b 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,5 @@ # 无源标靶上位机 -## Docker - -### 构建镜像 - -```bash -docker build -t passive-targeting-web . -``` - -### 运行容器 - -```bash -docker run -d -p 8080:8080 -p 8081:8081 --name passive-targeting-web passive-targeting-web -``` ## 开发注意事项 @@ -20,3 +7,15 @@ docker run -d -p 8080:8080 -p 8081:8081 --name passive-targeting-web passive-tar - 提交代码前,请将 `TCP_HOST` 设置回去 - 确保在生产环境中,`client\src\sections\wuyuanbiaoba\components\CameraView.jsx`,摄像头流的 streamUrl 指向正确的地址 - 提交代码前,请将 `streamUrl` 设置回去 + + +## 部署说明 +### 部署步骤 +1. 从项目的 [release](https://gitea.anxinyun.cn/qinjian/wuyuanbiaoba_web/releases) 页面下载最新的打包文件,如 `wuyuanbiaoba-web-x.x.x.tar.gz` +2. 上传到服务器的临时目录,如 `/tmp/folder/`(这里最好建立一个新的目录存放压缩文件) +3. 进入该目录,解压文件 `tar -xzf wuyuanbiaoba-web-x.x.x.tar.gz` +4. 进入解压后的目录 `cd wuyuanbiaoba-web-x.x.x` +5. 运行部署脚本 `sudo ./deploy.sh` +6. 脚本会自动停止现有服务,备份旧版本,安装新版本,并启动服务 +7. 部署完成后,可以通过 `sudo systemctl status wuyuanbiaoba-web.service` 查看服务状态 +8. 查看日志 `journalctl -u wuyuanbiaoba-web.service -f`