Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
performance-score
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tools
performance-score
Commits
cb5c7a46
Commit
cb5c7a46
authored
Aug 08, 2025
by
Performance System
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
eca0a9b0
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
176 additions
and
40 deletions
+176
-40
Docker部署指南.md
+4
-4
Docker部署说明.md
+7
-7
deploy.bat
+1
-1
docker-compose.yml
+1
-1
docker-deploy.bat
+1
-1
docker-manage.bat
+2
-2
start-dev.bat
+2
-2
start-server.cjs
+1
-1
start-system.ps1
+5
-5
一键修复问题.bat
+4
-4
启动开发服务器.bat
+2
-2
启动生产环境.bat
+3
-3
安装为Windows服务.bat
+2
-2
服务管理.bat
+2
-2
端口更改总结.md
+136
-0
部署生产环境.bat
+3
-3
No files found.
Docker部署指南.md
View file @
cb5c7a46
# 绩效计
分系统 Docker 部署指南
# 绩效计
分系统 Docker 部署指南
...
...
@@ -9,7 +9,7 @@
```
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Nginx Proxy │ │ Application │ │ PostgreSQL │
│ (Port 80/443) │────│ (Port
3000
) │────│ (Port 5432) │
│ (Port 80/443) │────│ (Port
4001
) │────│ (Port 5432) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│
┌─────────────────┐
...
...
@@ -70,7 +70,7 @@ docker-compose logs -f
-
**80**
: Nginx反向代理 (HTTP)
-
**443**
: Nginx反向代理 (HTTPS)
-
**8080**
: 应用主入口
-
**
3000
**
: 后端API服务
-
**
4001
**
: 后端API服务
-
**5432**
: PostgreSQL数据库
-
**6379**
: Redis缓存
...
...
@@ -81,7 +81,7 @@ docker-compose logs -f
```
yaml
environment
:
-
NODE_ENV=production
-
PORT=
3000
-
PORT=
4001
-
REDIS_URL=redis://redis:6379
-
DB_HOST=postgres
-
DB_PORT=5432
...
...
Docker部署说明.md
View file @
cb5c7a46
# 绩效计
分系统 8.8 版本 - Docker 部署说明
# 绩效计
分系统 8.8 版本 - Docker 部署说明
...
...
@@ -5,9 +5,9 @@
绩效计分系统 8.8 版本已成功部署到 Docker 容器中,现在可以通过以下方式访问:
### 🌐 访问地址
-
**主要访问地址**
: http://localhost:
3000
/
-
**管理员面板**
: http://localhost:
3000
/admin
-
**用户面板**
: http://localhost:
3000
/user
-
**主要访问地址**
: http://localhost:
4001
/
-
**管理员面板**
: http://localhost:
4001
/admin
-
**用户面板**
: http://localhost:
4001
/user
### 👥 默认登录账号
-
**管理员**
: admin / admin123
...
...
@@ -18,7 +18,7 @@
### 🐳 容器信息
-
**容器名称**
: scoring-system-8.8
-
**镜像版本**
: scoring-system:8.8
-
**端口映射**
:
3000
:80
-
**端口映射**
:
4001
:80
-
**状态**
: 运行中 (健康检查启用)
### 🛠️ 管理命令
...
...
@@ -94,7 +94,7 @@ volumes:
#### 端口被占用
```
bash
# 查看端口占用
netstat
-ano
| findstr :
3000
netstat
-ano
| findstr :
4001
# 使用其他端口
docker run
-d
-p
8080:80
--name
scoring-system-8.8 scoring-system:8.8
...
...
@@ -119,7 +119,7 @@ docker build -t scoring-system:8.8 .
## 🎯 下一步
系统已成功部署并运行,你可以:
1.
访问 http://localhost:
3000
/ 开始使用
1.
访问 http://localhost:
4001
/ 开始使用
2.
使用管理员账号登录查看所有功能
3.
测试图片上传和删除功能
4.
根据需要调整端口或配置
deploy.bat
View file @
cb5c7a46
...
...
@@ -70,7 +70,7 @@ echo ================================
echo.
echo 📋 服务信息:
echo - 主应用: http://localhost:8080
echo - API接口: http://localhost:
3000
echo - API接口: http://localhost:
4001
echo - 数据库: localhost:5432
echo - Redis: localhost:6379
echo.
...
...
docker-compose.yml
View file @
cb5c7a46
...
...
@@ -6,7 +6,7 @@ services:
dockerfile
:
Dockerfile
container_name
:
scoring-app-8.8
ports
:
-
"
8080
:80"
-
"
4001
:80"
restart
:
unless-stopped
environment
:
-
NODE_ENV=production
...
...
docker-deploy.bat
View file @
cb5c7a46
...
...
@@ -8,7 +8,7 @@ echo ========================================
set CONTAINER_NAME=scoring-system-8.8
set IMAGE_NAME=scoring-system:8.8
set PORT=
3000
set PORT=
4001
echo [1/4] 检查 Docker 环境...
docker --version >nul 2>&1
...
...
docker-manage.bat
View file @
cb5c7a46
...
...
@@ -82,14 +82,14 @@ echo 重新构建并部署...
docker stop %CONTAINER_NAME% >nul 2>&1
docker rm %CONTAINER_NAME% >nul 2>&1
docker build -t %IMAGE_NAME% .
docker run -d -p
3000
:80 --name %CONTAINER_NAME% %IMAGE_NAME%
docker run -d -p
4001
:80 --name %CONTAINER_NAME% %IMAGE_NAME%
echo 重新部署完成
goto menu
:open
echo.
echo 打开浏览器...
start http://localhost:
3000
/
start http://localhost:
4001
/
goto menu
:exit
...
...
start-dev.bat
View file @
cb5c7a46
...
...
@@ -34,9 +34,9 @@ if not exist "node_modules" (
echo [3/3] Starting development server...
echo.
echo Server will start at: http://localhost:
3000
echo Server will start at: http://localhost:
4001
echo.
echo Press Ctrl+C to stop the server
echo.
npx vite --port
3000
--host
npx vite --port
4001
--host
start-server.cjs
View file @
cb5c7a46
...
...
@@ -101,7 +101,7 @@ const server = http.createServer((req, res) => {
});
// 尝试不同的端口
const ports = [5174, 5175, 5176, 8080, 3000];
const ports = [
4001,
5174, 5175, 5176, 8080, 3000];
let currentPortIndex = 0;
function tryStartServer() {
...
...
start-system.ps1
View file @
cb5c7a46
...
...
@@ -30,14 +30,14 @@ Start-Sleep -Seconds 2
# 检查端口是否被占用
$port5173
=
Get-NetTCPConnection
-LocalPort 5173 -ErrorAction SilentlyContinue
$port
3000
=
Get-NetTCPConnection
-LocalPort 3000
-ErrorAction SilentlyContinue
$port
4001
=
Get-NetTCPConnection
-LocalPort 4001
-ErrorAction SilentlyContinue
if
(
$port5173
)
{
Write-Host
"警告: 端口5173仍被占用"
-ForegroundColor Yellow
}
if
(
$port
3000
)
{
Write-Host
"警告: 端口
3000
仍被占用"
-ForegroundColor Yellow
if
(
$port
4001
)
{
Write-Host
"警告: 端口
4001
仍被占用"
-ForegroundColor Yellow
}
# 安装依赖(如果需要)
...
...
@@ -79,8 +79,8 @@ try {
}
try
{
$websocketResponse
=
Invoke-WebRequest
-Uri
"http://localhost:
3000
"
-Method HEAD -TimeoutSec 5 -ErrorAction Stop
Write-Host
"✓ WebSocket服务器运行正常 (http://localhost:
3000
)"
-ForegroundColor Green
$websocketResponse
=
Invoke-WebRequest
-Uri
"http://localhost:
4001
"
-Method HEAD -TimeoutSec 5 -ErrorAction Stop
Write-Host
"✓ WebSocket服务器运行正常 (http://localhost:
4001
)"
-ForegroundColor Green
}
catch
{
Write-Host
"✗ WebSocket服务器启动失败"
-ForegroundColor Red
}
...
...
一键修复问题.bat
View file @
cb5c7a46
@echo
off
@echo
off
...
...
@@ -112,7 +112,7 @@ if not errorlevel 1 (
:: 启动开发服务器
echo 🚀 启动开发服务器...
start "绩效计分系统" npx vite --port
3000
--host
start "绩效计分系统" npx vite --port
4001
--host
:: 等待服务器启动
echo 等待服务器启动...
...
...
@@ -120,7 +120,7 @@ timeout /t 8 >nul
:: 验证服务器状态
echo [8/8] 验证服务器状态...
echo ✅ 开发服务器已启动,请在浏览器中访问 http://localhost:
3000
echo ✅ 开发服务器已启动,请在浏览器中访问 http://localhost:
4001
echo.
echo ========================================
...
...
@@ -130,7 +130,7 @@ echo.
echo 🎉 问题修复完成,请按照以下步骤验证:
echo.
echo 1. 打开浏览器的无痕模式
echo 2. 访问: http://localhost:
3000
echo 2. 访问: http://localhost:
4001
echo 3. 检查登录页面是否还显示测试账号
echo.
echo 📋 如果仍有问题,请:
...
...
启动开发服务器.bat
View file @
cb5c7a46
@echo
off
@echo
off
...
...
@@ -39,7 +39,7 @@ REM 尝试不同端口启动Vite开发服务器
echo 🔍 寻找可用端口...
REM 端口列表
set ports=
5176 5177 5178 5179 3000 3001 4000 4001
set ports=
4001 5176 5177 5178 5179 3001 4000 3000
for %%p in (%ports%) do (
echo 🔄 尝试端口 %%p...
...
...
启动生产环境.bat
View file @
cb5c7a46
@echo
off
@echo
off
...
...
@@ -27,7 +27,7 @@ echo.
echo 🚀 正在启动生产服务器...
echo.
echo 启动成功后,请在浏览器中访问: http://localhost:
3000
echo 启动成功后,请在浏览器中访问: http://localhost:
4001
echo.
echo 默认登录账号:
echo - 管理员: admin / admin123
...
...
@@ -39,6 +39,6 @@ echo 按 Ctrl+C 可停止服务器
echo ========================================
echo.
serve -s dist -l
3000
serve -s dist -l
4001
pause
安装为Windows服务.bat
View file @
cb5c7a46
@echo
off
@echo
off
...
...
@@ -70,7 +70,7 @@ echo module.exports = { > ecosystem.config.js
echo apps: [{ >> ecosystem.config.js
echo name: 'performance-system', >> ecosystem.config.js
echo script: 'serve', >> ecosystem.config.js
echo args: '-s dist -l
3000
', >> ecosystem.config.js
echo args: '-s dist -l
4001
', >> ecosystem.config.js
echo cwd: '%CD%', >> ecosystem.config.js
echo instances: 1, >> ecosystem.config.js
echo autorestart: true, >> ecosystem.config.js
...
...
服务管理.bat
View file @
cb5c7a46
@echo
off
@echo
off
...
...
@@ -97,7 +97,7 @@ goto menu
:open
echo.
echo 🌐 正在打开系统网址...
start http://localhost:
3000
start http://localhost:
4001
echo.
pause
goto menu
...
...
端口更改总结.md
0 → 100644
View file @
cb5c7a46
# 端口更改总结 - 从 3000 改为 4001
# 端口更改总结 - 从 3000 改为 4001
## 🔄 更改概述
已成功将绩效计分系统的默认端口从
**3000**
更改为
**4001**
。
## 📁 修改的文件列表
### Docker 相关配置
-
✅
`docker-compose.yml`
- 端口映射 8080:80 → 4001:80
-
✅
`docker-deploy.bat`
- PORT=3000 → PORT=4001
-
✅
`docker-manage.bat`
- 容器端口和浏览器链接
-
✅
`Docker部署说明.md`
- 所有访问地址和端口引用
### 启动脚本
-
✅
`启动生产环境.bat`
- serve -l 3000 → serve -l 4001
-
✅
`部署生产环境.bat`
- serve -l 3000 → serve -l 4001
-
✅
`start-dev.bat`
- --port 3000 → --port 4001
-
✅
`启动开发服务器.bat`
- 端口优先级调整,4001 优先
-
✅
`一键修复问题.bat`
- --port 3000 → --port 4001
### 系统服务相关
-
✅
`安装为Windows服务.bat`
- serve -l 3000 → serve -l 4001
-
✅
`服务管理.bat`
- 浏览器链接更新
-
✅
`start-system.ps1`
- 端口检测和健康检查
-
✅
`start-server.cjs`
- 端口优先级调整
### 文档和部署指南
-
✅
`Docker部署指南.md`
- 架构图和端口说明
-
✅
`deploy.bat`
- API接口地址
## 🌐 新的访问地址
### Docker 部署
-
**主要访问地址**
: http://localhost:4001/
-
**管理员面板**
: http://localhost:4001/admin
-
**用户面板**
: http://localhost:4001/user
### 本地开发
-
**开发服务器**
: http://localhost:4001/
-
**生产服务器**
: http://localhost:4001/
## 🐳 Docker 容器状态
```
bash
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b5fc79d38d4f scoring-system:8.8
"/docker-entrypoint.…"
15 seconds ago Up 14 seconds
(
health: starting
)
0.0.0.0:4001->80/tcp,
[
::]:4001->80/tcp scoring-system-8.8
```
-
✅ 容器已重新启动
-
✅ 端口映射已更新为 4001:80
-
✅ 健康检查正常
## 🔧 端口优先级调整
在支持多端口的脚本中,已将 4001 设置为首选端口:
### 启动开发服务器.bat
```
batch
set ports=4001 5176 5177 5178 5179 3001 4000 3000
```
### start-server.cjs
```
javascript
const
ports
=
[
4001
,
5174
,
5175
,
5176
,
8080
,
3000
];
```
## 📋 验证清单
-
✅ Docker 容器在端口 4001 运行
-
✅ 浏览器可以访问 http://localhost:4001/
-
✅ 所有启动脚本已更新
-
✅ 文档和说明已同步更新
-
✅ 服务管理脚本已更新
## 🎯 使用说明
### 启动 Docker 容器
```
bash
# 使用 docker-compose
docker-compose up
-d
# 或使用一键部署脚本
.
\d
ocker-deploy.bat
# 或使用管理脚本
.
\d
ocker-manage.bat
```
### 启动开发服务器
```
bash
# 使用开发脚本
.
\启
动开发服务器.bat
# 或直接使用 Vite
npx vite
--port
4001
--host
```
### 启动生产服务器
```
bash
# 使用生产脚本
.
\启
动生产环境.bat
# 或直接使用 serve
serve
-s
dist
-l
4001
```
## 🔍 故障排除
### 端口冲突检查
```
bash
# Windows
netstat
-ano
| findstr :4001
# PowerShell
Get-NetTCPConnection
-LocalPort
4001
```
### 容器管理
```
bash
# 查看容器状态
docker ps
# 重启容器
docker restart scoring-system-8.8
# 查看日志
docker logs scoring-system-8.8
```
---
**更改完成时间**
: 2025-08-08
**新访问地址**
: http://localhost:4001/
**容器状态**
: ✅ 运行中
部署生产环境.bat
View file @
cb5c7a46
@echo
off
@echo
off
...
...
@@ -79,7 +79,7 @@ echo.
echo 🚀 正在启动生产服务器...
echo.
echo 启动成功后,请在浏览器中访问: http://localhost:
3000
echo 启动成功后,请在浏览器中访问: http://localhost:
4001
echo.
echo 默认登录账号:
echo - 管理员: admin / admin123
...
...
@@ -91,6 +91,6 @@ echo 按 Ctrl+C 可停止服务器
echo ========================================
echo.
serve -s dist -l
3000
serve -s dist -l
4001
pause
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment