From 42a26dee34a65a8f8dcf4f028fbcc3fb50a85143 Mon Sep 17 00:00:00 2001 From: qinjian Date: Thu, 11 Sep 2025 08:55:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=20.gitignore=20?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=BB=A5=E5=8C=85=E5=90=AB=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E5=92=8C=E5=8E=8B=E7=BC=A9=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=EF=BC=8C=E6=B8=85=E7=90=86=E4=B8=8D=E5=BF=85?= =?UTF-8?q?=E8=A6=81=E7=9A=84=20Docker=20=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ README.md | 25 ++++++++++++------------- 2 files changed, 14 insertions(+), 13 deletions(-) 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`