|
|
@ -78,80 +78,6 @@ pnpm dev
|
|
|
|
pnpm build
|
|
|
|
pnpm build
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Docker镜像启动前端(单体模式)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- host设置
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>注意: 需要把`127.0.0.1`替换成真实IP 比如`192.`开头,不然后端不通。
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
|
|
127.0.0.1 jeecg-boot-system
|
|
|
|
|
|
|
|
127.0.0.1 jeecg-boot-gateway
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- 下载项目
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
|
|
git clone https://github.com/jeecgboot/JeecgBoot.git
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cd JeecgBoot/jeecgboot-vue3
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- 配置接口域名 `.env.production`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
|
|
VITE_GLOB_API_URL=/jeecgboot
|
|
|
|
|
|
|
|
VITE_GLOB_DOMAIN_URL=http://jeecg-boot-system:8080/jeecg-boot
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
后台单体启动 [见此文档](https://help.jeecg.com/java/setup/docker/up.html)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- 编译项目
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
|
|
pnpm install
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pnpm build
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- 启动容器
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
|
|
docker build -t jeecgboot-vue3 .
|
|
|
|
|
|
|
|
docker run --name jeecgboot-vue3-nginx -p 80:80 -d jeecgboot-vue3
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- 访问前台
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
http://localhost
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Docker镜像启动前端(微服务模式)
|
|
|
|
|
|
|
|
> 这里只写与单体的区别步骤
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- 区别1. 修改后台域名
|
|
|
|
|
|
|
|
.env.production
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
|
|
VITE_GLOB_API_URL=/jeecgboot
|
|
|
|
|
|
|
|
VITE_GLOB_DOMAIN_URL=http://jeecg-boot-gateway:9999
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
后台微服务启动 [见此文档](https://help.jeecg.com/java/springcloud/docker.html)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- 区别2. 修改Dockerfile文件
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
|
|
- 把`http://jeecg-boot-system:8080/jeecg-boot`替换成 `http://jeecg-boot-gateway:9999`
|
|
|
|
|
|
|
|
- 把`jeecg-boot-system`替换成 `jeecg-boot-gateway`
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- 其他与单体模式一样
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
|
|
镜像需要重现构建,最好把单体的镜像删掉,重新构建docker镜像。
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 入门必备
|
|
|
|
## 入门必备
|
|
|
|
|
|
|
|
|
|
|
|
本项目需要一定前端基础知识,请确保掌握 Vue 的基础知识,以便能处理一些常见的问题。 建议在开发前先学一下以下内容,提前了解和学习这些知识,会对项目理解非常有帮助:
|
|
|
|
本项目需要一定前端基础知识,请确保掌握 Vue 的基础知识,以便能处理一些常见的问题。 建议在开发前先学一下以下内容,提前了解和学习这些知识,会对项目理解非常有帮助:
|
|
|
@ -166,9 +92,7 @@ VITE_GLOB_DOMAIN_URL=http://jeecg-boot-gateway:9999
|
|
|
|
* [Vitejs](https://cn.vitejs.dev/guide/)
|
|
|
|
* [Vitejs](https://cn.vitejs.dev/guide/)
|
|
|
|
* [Pinia(vuex替代方案)](https://pinia.esm.dev/introduction.html)
|
|
|
|
* [Pinia(vuex替代方案)](https://pinia.esm.dev/introduction.html)
|
|
|
|
* [Vue-RFCS](https://github.com/vuejs/rfcs)
|
|
|
|
* [Vue-RFCS](https://github.com/vuejs/rfcs)
|
|
|
|
* [Vue2 迁移到 3](https://v3.vuejs.org/guide/migration/introduction.html)
|
|
|
|
|
|
|
|
* [vxetable文档](https://vxetable.cn)
|
|
|
|
* [vxetable文档](https://vxetable.cn)
|
|
|
|
* [~~WindiCss~~](https://windicss.netlify.app/)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 浏览器支持
|
|
|
|
## 浏览器支持
|
|
|
|