47 lines
1.0 KiB
Markdown
47 lines
1.0 KiB
Markdown
# 10-File 部署
|
||
|
||
## 说明
|
||
|
||
部署 File 文件服务模块,提供文件上传和下载功能。
|
||
|
||
## 部署流程
|
||
|
||
1. **打包 File** - 执行 bin/package.sh ruoyi-modules-file
|
||
2. **复制 jar** - 复制 jar 文件到 docker/ruoyi/modules/file/jar
|
||
3. **构建镜像** - 使用 docker-compose 构建 File 镜像
|
||
4. **导入镜像** - 如果是 Minikube 环境,自动导入镜像
|
||
5. **部署到 K8s** - 部署 PVC、Service 和 Deployment
|
||
6. **等待启动** - 等待 Pod 就绪
|
||
|
||
## 配置说明
|
||
|
||
- **Service 名称**: ruoyi-modules-file
|
||
- **端口**: 9300
|
||
- **镜像**: ruoyi-modules-file-runtime
|
||
- **存储**: 10Gi PVC 用于文件上传
|
||
- **上传路径**: /var/lib/uploadPath
|
||
|
||
## 文件说明
|
||
|
||
- `service.yaml` - File Service 配置(ClusterIP)
|
||
- `deployment.yaml` - File Deployment 配置
|
||
- `pvc.yaml` - 文件上传 PVC 配置
|
||
- `deploy.sh` - 一键部署脚本
|
||
|
||
## 部署步骤
|
||
|
||
```bash
|
||
# 进入目录
|
||
cd 10-file
|
||
|
||
# 执行部署脚本
|
||
./deploy.sh
|
||
```
|
||
|
||
## 访问
|
||
|
||
```bash
|
||
# 集群内访问
|
||
ruoyi-modules-file.ruoyi.svc.cluster.local:9300
|
||
```
|