修复bug
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
# Shell 脚本强制 LF,避免 Linux 部署报错
|
||||
*.sh text eol=lf
|
||||
|
||||
# 配置文件
|
||||
*.cjs text eol=lf
|
||||
*.js text eol=lf
|
||||
*.json text eol=lf
|
||||
*.md text eol=lf
|
||||
*.sql text eol=lf
|
||||
*.py text eol=lf
|
||||
*.vue text eol=lf
|
||||
*.css text eol=lf
|
||||
*.html text eol=lf
|
||||
@@ -174,6 +174,7 @@ pm2 start crypto-pre-trade
|
||||
|
||||
| 现象 | 排查方式 |
|
||||
|------|---------|
|
||||
| `$'\r': command not found` | Windows 换行符问题,执行 `sed -i 's/\r$//' deploy/install.sh` 后重试 |
|
||||
| 无法访问 | `pm2 status` 确认进程 online;`curl http://127.0.0.1:1125/api/health` |
|
||||
| 502 / 连接拒绝 | 检查防火墙是否放行 1125 端口 |
|
||||
| 前端白屏 | 确认 `frontend/dist` 存在;重新 `npm run build` |
|
||||
|
||||
+1
-1
@@ -95,7 +95,7 @@ pm2 startup systemd -u root --hp /root 2>/dev/null | tail -1 | bash 2>/dev/null
|
||||
log "等待服务启动..."
|
||||
sleep 3
|
||||
if curl -sf "http://127.0.0.1:${PORT}/api/health" > /dev/null; then
|
||||
log "健康检查通过 ✓"
|
||||
log "健康检查通过"
|
||||
else
|
||||
warn "健康检查未通过,请查看日志:pm2 logs crypto-pre-trade"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user