diff --git a/README.md b/README.md index cecbe69..d2c305c 100644 --- a/README.md +++ b/README.md @@ -39,10 +39,10 @@ chart-label-tool/ ```bash cd public -python3 -m http.server 8080 +python3 -m http.server 8010 ``` -浏览器访问: +浏览器访问: ## 服务器部署(Ubuntu / 局域网) @@ -54,7 +54,7 @@ cd /opt/chart-label-tool sudo bash deploy/install.sh ``` -局域网访问:`http://<服务器IP>:8080` +局域网访问:`http://<服务器IP>:8010` ## 使用说明 diff --git a/deploy/ecosystem.config.cjs b/deploy/ecosystem.config.cjs index b62a004..de71b3c 100644 --- a/deploy/ecosystem.config.cjs +++ b/deploy/ecosystem.config.cjs @@ -8,7 +8,7 @@ module.exports = { name: "chart-label-tool", cwd: "/opt/chart-label-tool", script: "/opt/chart-label-tool/venv/bin/python", - args: "-m http.server 8080 --bind 0.0.0.0 --directory /opt/chart-label-tool/public", + args: "-m http.server 8010 --bind 0.0.0.0 --directory /opt/chart-label-tool/public", interpreter: "none", autorestart: true, watch: false, diff --git a/deploy/install.sh b/deploy/install.sh index 8067021..e458372 100644 --- a/deploy/install.sh +++ b/deploy/install.sh @@ -7,7 +7,7 @@ set -euo pipefail APP_DIR="/opt/chart-label-tool" REPO_URL="https://git.bz121.com/dekun/chart-label-tool.git" -PORT=8080 +PORT=8010 SERVICE_USER="root" echo "==> K线点位标注工具 部署开始" diff --git a/docs/DEPLOY.md b/docs/DEPLOY.md index 3eb7bb8..e3c0863 100644 --- a/docs/DEPLOY.md +++ b/docs/DEPLOY.md @@ -15,7 +15,7 @@ ``` 浏览器 (局域网) - ↓ HTTP :8080 + ↓ HTTP :8010 PM2 → Python venv → http.server ↓ 静态文件 /opt/chart-label-tool/public/ @@ -42,13 +42,13 @@ sudo bash deploy/install.sh 2. 安装 Node.js 与 PM2(若未安装) 3. 克隆/更新代码到 `/opt/chart-label-tool` 4. 创建 Python 虚拟环境 `venv/` -5. 使用 PM2 启动 `chart-label-tool` 进程(监听 `0.0.0.0:8080`) +5. 使用 PM2 启动 `chart-label-tool` 进程(监听 `0.0.0.0:8010`) 6. 执行 `pm2 save` 与 `pm2 startup`(开机自启) 部署成功后,在局域网内任意电脑浏览器访问: ```text -http://<服务器局域网IP>:8080 +http://<服务器局域网IP>:8010 ``` 查看本机 IP: @@ -104,17 +104,17 @@ sudo pm2 startup ```bash pm2 status -curl -I http://127.0.0.1:8080 +curl -I http://127.0.0.1:8010 ``` -浏览器打开 `http://<服务器IP>:8080`,应能看到标注工具页面。 +浏览器打开 `http://<服务器IP>:8010`,应能看到标注工具页面。 ## 防火墙 -若启用了 UFW,需放行 8080 端口: +若启用了 UFW,需放行 8010 端口: ```bash -sudo ufw allow 8080/tcp +sudo ufw allow 8010/tcp sudo ufw reload ``` @@ -147,9 +147,9 @@ pm2 restart chart-label-tool ### 页面无法打开 1. `pm2 status` 确认进程为 `online` -2. `ss -tlnp | grep 8080` 确认端口在监听 +2. `ss -tlnp | grep 8010` 确认端口在监听 3. 检查服务器与客户端是否同一局域网 -4. 检查防火墙是否放行 8080 +4. 检查防火墙是否放行 8010 ### PM2 启动失败 @@ -166,7 +166,7 @@ ls -la /opt/chart-label-tool/venv/bin/python 手动测试: ```bash -/opt/chart-label-tool/venv/bin/python -m http.server 8080 --bind 0.0.0.0 --directory /opt/chart-label-tool/public +/opt/chart-label-tool/venv/bin/python -m http.server 8010 --bind 0.0.0.0 --directory /opt/chart-label-tool/public ``` ### Git 拉取失败 diff --git a/docs/USAGE.md b/docs/USAGE.md index 61a457f..243ed8e 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -2,8 +2,8 @@ ## 访问地址 -- **局域网部署**:`http://<服务器IP>:8080` -- **本机调试**:`http://localhost:8080` +- **局域网部署**:`http://<服务器IP>:8010` +- **本机调试**:`http://localhost:8010` 推荐使用 **Chrome** 或 **Edge** 浏览器。