Skip to content

Commit 5d4a87a

Browse files
author
CodeJudge
committed
docs: 重写快速开始 Windows新手体验版
1 parent 3f1cd2b commit 5d4a87a

1 file changed

Lines changed: 20 additions & 11 deletions

File tree

README.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,32 @@ onlinejudge/
5757

5858
## 快速开始
5959

60-
### 1. 克隆项目
60+
> ⚠️ **新手体验指南** — 以下教程仅适用于 Windows 10/11 下的快速体验,**请勿在生产环境使用**。如有生产需求,请使用 Linux 服务器部署。
61+
62+
### 🐳 Windows Docker 部署(推荐,零配置)
63+
64+
```bash
65+
# 请选择磁盘富余的位置,打开 PowerShell 运行:
66+
git clone https://github.com/anyncfunction/codejudge.git
67+
cd codejudge
68+
docker compose up -d
69+
```
70+
71+
> 根据网速,首次运行会自动下载依赖镜像,大约 5~30 分钟。
72+
> 等命令执行完,运行 `docker ps -a`,所有容器状态无 `unhealthy` 即启动成功。
73+
> 访问 http://localhost:3001
74+
75+
### 💻 本地开发部署
6176

6277
```bash
78+
# 克隆项目
6379
git clone https://github.com/anyncfunction/codejudge.git
6480
cd codejudge
6581
```
6682

6783
> 如果网络不稳定,可使用镜像加速:`git clone https://hub.fastgit.xyz/anyncfunction/codejudge.git`
6884
69-
### 2. 安装依赖
85+
#### 安装依赖
7086

7187
```bash
7288
# 后端
@@ -78,7 +94,7 @@ cd ../frontend
7894
npm install
7995
```
8096

81-
### 3. 启动
97+
#### 启动
8298

8399
```bash
84100
# 开发模式(前后端分离,推荐)
@@ -93,20 +109,13 @@ cd backend
93109
npm start # 访问 http://localhost:3001
94110
```
95111

96-
### 4. 构建前端(可选)
112+
#### 构建前端(可选)
97113

98114
```bash
99115
cd frontend
100116
npm run build # 输出到 dist/,后端自动托管
101117
```
102118

103-
### 5. Docker 部署(推荐)
104-
105-
```bash
106-
docker compose up -d # 在项目根目录执行
107-
# 访问 http://localhost:3001
108-
```
109-
110119
## 预置账户
111120

112121
| 角色 | 邮箱 | 密码 |

0 commit comments

Comments
 (0)