docs: 📝 项目部署说明更新
This commit is contained in:
45
README.md
45
README.md
@@ -49,10 +49,6 @@
|
|||||||
|
|
||||||
## 项目截图
|
## 项目截图
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
@@ -99,26 +95,33 @@ pnpm run dev
|
|||||||
|
|
||||||
## 项目部署
|
## 项目部署
|
||||||
|
|
||||||
```bash
|
[Nginx 安装和配置](https://blog.csdn.net/u013737132/article/details/145667694)
|
||||||
# 项目打包
|
|
||||||
pnpm run build
|
**项目打包**
|
||||||
|
```bash
|
||||||
|
pnpm run build
|
||||||
|
# 生成文件将输出至 /dist 目录
|
||||||
|
```
|
||||||
|
|
||||||
|
**部署静态资源**
|
||||||
|
|
||||||
# 上传文件至远程服务器
|
|
||||||
将本地打包生成的 dist 目录下的所有文件拷贝至服务器的 /usr/share/nginx/html 目录。
|
将本地打包生成的 dist 目录下的所有文件拷贝至服务器的 /usr/share/nginx/html 目录。
|
||||||
|
|
||||||
|
**Nginx 配置**
|
||||||
|
```shell
|
||||||
# nginx.cofig 配置
|
# nginx.cofig 配置
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name localhost;
|
server_name localhost;
|
||||||
location / {
|
location / {
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html index.htm;
|
index index.html index.htm;
|
||||||
}
|
}
|
||||||
# 反向代理配置
|
# 反向代理配置
|
||||||
location /prod-api/ {
|
location /prod-api/ {
|
||||||
# api.youlai.tech 替换后端API地址,注意保留后面的斜杠 /
|
# api.youlai.tech 替换后端API地址,注意保留后面的斜杠 /
|
||||||
proxy_pass http://api.youlai.tech/;
|
proxy_pass http://api.youlai.tech/;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -165,8 +168,8 @@ server {
|
|||||||
|
|
||||||
- [基于 Vue3 + Vite + TypeScript + Element-Plus 从0到1搭建后台管理系统](https://blog.csdn.net/u013737132/article/details/130191394)
|
- [基于 Vue3 + Vite + TypeScript + Element-Plus 从0到1搭建后台管理系统](https://blog.csdn.net/u013737132/article/details/130191394)
|
||||||
|
|
||||||
- [ESLint+Prettier+Stylelint+EditorConfig 约束和统一前端代码规范](https://blog.csdn.net/u013737132/article/details/130190788)
|
- [ESLint+Prettier+Stylelint+EditorConfig 约束和统一前端代码规范](https://youlai.blog.csdn.net/article/details/145608723)
|
||||||
- [Husky + Lint-staged + Commitlint + Commitizen + cz-git 配置 Git 提交规范](https://blog.csdn.net/u013737132/article/details/130191363)
|
- [Husky + Lint-staged + Commitlint + Commitizen + cz-git 配置 Git 提交规范](https://youlai.blog.csdn.net/article/details/145615236)
|
||||||
|
|
||||||
|
|
||||||
## 提交规范
|
## 提交规范
|
||||||
|
|||||||
Reference in New Issue
Block a user