前端修饰与渲染处理
This commit is contained in:
27
README.md
27
README.md
@@ -129,10 +129,37 @@ npm run dev
|
||||
# 或者分别启动
|
||||
npm run dev:server # 后端 http://localhost:3000
|
||||
npm run dev:client # 前端 http://localhost:5173
|
||||
|
||||
# Docker 部署后访问
|
||||
# 后端: http://localhost:3000
|
||||
# 前端: http://localhost:23337
|
||||
```
|
||||
|
||||
### Docker 部署
|
||||
|
||||
#### 中国大陆用户特别说明
|
||||
|
||||
由于网络原因,在中国大陆构建 Docker 镜像可能会遇到依赖下载缓慢或卡死的问题。项目已针对此情况进行了优化:
|
||||
|
||||
1. **自动使用国内镜像源**:通过 `.npmrc` 文件配置 `https://registry.npmmirror.com` 作为 npm 镜像源
|
||||
2. **简化构建流程**:移除 BuildKit cache mount,使用更稳定的方式
|
||||
3. **提供一键构建脚本**:
|
||||
```bash
|
||||
# Windows 用户(PowerShell)
|
||||
.\build-docker.ps1
|
||||
|
||||
# Windows 用户(CMD)
|
||||
build-docker.bat
|
||||
|
||||
# Linux/Mac 用户
|
||||
chmod +x build-docker.sh
|
||||
./build-docker.sh
|
||||
```
|
||||
|
||||
4. **详细的故障排除指南**:如果构建仍然失败,请参考 [TROUBLESHOOTING.md](./TROUBLESHOOTING.md)
|
||||
|
||||
#### 标准部署流程
|
||||
|
||||
```bash
|
||||
# 构建镜像
|
||||
npm run docker:build
|
||||
|
||||
Reference in New Issue
Block a user