diff --git a/README-Docker.md b/README-Docker.md index 2a829a97..7837dc20 100644 --- a/README-Docker.md +++ b/README-Docker.md @@ -3,6 +3,16 @@ ## 后端 执行目录:Yi\Yi.Abp.Net8 +#### 启动 +D:/code/csharp/source/Yi/Yi.Bbs.Vue3/yi-bbs.conf 为我的配置文件,内部带了默认的配置文件,根据自己配置进行更改 + +//不带配置文件 +docker run -d --name yi.admin -p 19001:19001 jiftcc/yi.admin:1.0.0 + +//带配置文件 +docker run -d --name yi.admin -p 19001:19001 -v D:/code/csharp/source/Yi/Yi.Abp.Net8/src/Yi.Abp.Web/appsettings.json:/app/appsettings.json jiftcc/yi.admin:1.0.0 + + #### 完整代码编译 docker build -t jiftcc/yi.admin:1.0.0 -f Dockerfile . @@ -12,11 +22,17 @@ docker build -t jiftcc/yi.admin:1.0.0 -f DockerfileFast . -## 前端(待完善) +## 前端 执行目录:Yi\Yi.Bbs.Vue3 +#### 启动 +D:/code/csharp/source/Yi/Yi.Bbs.Vue3/yi-bbs.conf 为我的conf配置目录,默认反向代理到ccnetcore.com,根据自己后端地址进行修改配置 + +docker run -d --name yi.bbs -p 18001:18001 -v D:/code/csharp/source/Yi/Yi.Bbs.Vue3/yi-bbs.conf:/etc/nginx/conf.d/yi-bbs.conf jiftcc/yi.bbs:1.0.0 + #### 完整代码编译 docker build -t jiftcc/yi.bbs:1.0.0 -f Dockerfile . #### 快速产物编译 docker build -t jiftcc/yi.bbs:1.0.0 -f DockerfileFast . + diff --git a/README-en.md b/README-en.md index d335fb7b..f696743a 100644 --- a/README-en.md +++ b/README-en.md @@ -35,6 +35,16 @@ A Comprehensive Solution, Ultimately Just Another Wheel. - Yi.RuoYi.Vue3:RuoYi JS Backend Frontend **** +## 🍉 docker + +Full content:README-Docker.md + +backend:`docker run -d --name yi.admin -p 19001:19001 jiftcc/yi.admin:last` + +bbs frontend:`docker run -d --name yi.bbs -p 18001:18001 -v /home/Yi/Yi.Bbs.Vue3/yi-bbs.conf:/etc/nginx/conf.d/yi-bbs.conf jiftcc/yi.bbs:last` + +**** + ## 🍊 Official website and demo link: diff --git a/README.md b/README.md index 1404b644..705702d1 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,15 @@ Yi框架-一套与SqlSugar一样爽的.Net8开源框架。 - Yi.Pure.Vue3:Pure ts后台前端 - Yi.RuoYi.Vue3:RuoYi js后台前端 +**** +## 🍉 docker 一键启动 + +完整内容在:README-Docker.md + +后端:`docker run -d --name yi.admin -p 19001:19001 jiftcc/yi.admin:last` + +bbs前端:`docker run -d --name yi.bbs -p 18001:18001 -v /home/Yi/Yi.Bbs.Vue3/yi-bbs.conf:/etc/nginx/conf.d/yi-bbs.conf jiftcc/yi.bbs:last` + **** ## 🍊 官网及演示地址: @@ -60,6 +69,7 @@ Pure后台演示地址:https://ccnetcore.com:1001 (用户cc、密码123456 - [x] 完全支持微服务架构 **** + ## 🍇 详细到爆炸的Yi框架教程导航: 1. [框架快速开始教程](https://ccnetcore.com/article/aaa00329-7f35-d3fe-d258-3a0f8380b742)(已完成) diff --git a/Yi.Bbs.Vue3/.dockerignore b/Yi.Bbs.Vue3/.dockerignore new file mode 100644 index 00000000..f1079cd5 --- /dev/null +++ b/Yi.Bbs.Vue3/.dockerignore @@ -0,0 +1,33 @@ +**/.classpath +**/.dockerignore +**/.env +**/.git +**/.gitignore +**/.project +**/.settings +**/.toolstarget +**/.vs +**/.vscode +**/*.*proj.user +**/*.dbmdl +**/*.jfm +**/azds.yaml +**/bin +**/charts +**/docker-compose* +**/Dockerfile* +**/node_modules +**/npm-debug.log +**/obj +**/secrets.dev.yaml +**/values.dev.yaml +LICENSE +README.md +!**/.gitignore +!.git/HEAD +!.git/config +!.git/packed-refs +!.git/refs/heads/** +appsettings.Development.json +appsettings.Production.json +appsettings.Staging.json \ No newline at end of file diff --git a/Yi.Bbs.Vue3/Dockerfile b/Yi.Bbs.Vue3/Dockerfile index 40422ba0..a4823e13 100644 --- a/Yi.Bbs.Vue3/Dockerfile +++ b/Yi.Bbs.Vue3/Dockerfile @@ -1,5 +1,4 @@ -FROM nginx as base -COPY nginx.conf /etc/nginx/nginx.conf +FROM nginx:stable-alpine3.20-perl as base EXPOSE 18001 FROM node:20.18 as publish @@ -10,5 +9,5 @@ RUN npm run build FROM base AS final WORKDIR /app -COPY --from=publish /dist/* . +COPY --from=publish /main/dist/ . ENTRYPOINT ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/Yi.Bbs.Vue3/yi-bbs.conf b/Yi.Bbs.Vue3/yi-bbs.conf new file mode 100644 index 00000000..c2ebfe7a --- /dev/null +++ b/Yi.Bbs.Vue3/yi-bbs.conf @@ -0,0 +1,28 @@ + server { + client_header_buffer_size 10k; + large_client_header_buffers 40 40k; + listen 18001; + server_name _; + client_max_body_size 100m; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + location /{ + root /app; + index index.html; + try_files $uri $uri/ /index.html; + } + + + location /prod-api/ { + proxy_pass http://ccnetcore.com:19001/api/app/; + } + + location /prod-ws/ { + proxy_pass http://ccnetcore.com:19001/hub/; + } +}