Skip to content

Commit 11a21a6

Browse files
WebRouterclaude
andcommitted
fix(deploy): use 5050 for Flask port in install.sh start.sh
install.sh generated a start.sh that hardcoded port 5000 for Flask, but WebRouter's standard port is 5050 (per start.py defaults and the rest of the codebase). 5000 is a different project's Flask service. Align install.sh to 5050 so both start.sh and start.py behave the same. docs/04-installation.md: drop the now-obsolete port-difference note; both startup paths use 5050 (Flask) + 5051 (wr-proxy). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 23b3e8a commit 11a21a6

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

deploy/install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,13 @@ fi
226226
echo "启动 WebRouter..."
227227
cd backend
228228
DATABASE_URI="${DATABASE_URI:-sqlite:///$PWD/../data/webrouter.db}" \
229-
nohup python3 -c "from app import create_app; app = create_app(); app.run(host='0.0.0.0', port=5000)" \
229+
nohup python3 -c "from app import create_app; app = create_app(); app.run(host='0.0.0.0', port=5050)" \
230230
> ../logs/webrouter.log 2>&1 &
231231
echo $! > ../logs/webrouter.pid
232232
233233
echo ""
234234
echo "WebRouter 已启动!"
235-
echo " 管理后台: http://localhost:5000"
235+
echo " 管理后台: http://localhost:5050"
236236
echo " 代理网关: http://localhost:5051"
237237
echo " 日志目录: $(pwd)/../logs/"
238238
echo ""
@@ -256,7 +256,7 @@ echo "============================================"
256256
echo " 安装完成!"
257257
echo "============================================"
258258
echo ""
259-
echo " 管理后台: http://localhost:5000"
259+
echo " 管理后台: http://localhost:5050"
260260
echo " 代理网关: http://localhost:5051"
261261
echo " 安装目录: $INSTALL_DIR"
262262
echo " 配置文件: $INSTALL_DIR/.env"

docs/04-installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ python3 backend/start.py logs # 查看日志
255255
- 端口占用检测和启动失败诊断
256256
- 支持 `WEBROUTER_PORT` / `WR_PROXY_PORT` 环境变量自定义端口
257257

258-
> ⚠️ **端口差异说明** `install.sh` 生成的简化 `start.sh` 默认用 **5000** 端口启动 Flask(硬编码)。`start.py` 默认用 **5050**。如果用 `start.sh` 启动,访问 `http://localhost:5000`;用 `start.py` 启动,访问 `http://localhost:5050`。生产环境推荐 `start.py`
258+
> 两种启动方式的端口一致**5050**(Flask 管理后台)+ **5051**(wr-proxy 网关)。生产环境推荐 `start.py`,因为它统一管理三个进程并提供启动诊断
259259
260260
### 自定义端口
261261

0 commit comments

Comments
 (0)