This commit is contained in:
不做码农 2022-06-01 17:36:40 +08:00
parent 67ef7e3fc1
commit f7c6256e1b
4 changed files with 42 additions and 42 deletions

View File

@ -1,21 +1,21 @@
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
#创建 /app文件夹 #创建 /app文件夹
WORKDIR /app WORKDIR /app
#创建挂载目录,用于将程序部署在服务器本地 #创建挂载目录,用于将程序部署在服务器本地
#VOLUME /app #VOLUME /app
#设置docker容器对外暴露端口 #设置docker容器对外暴露端口
EXPOSE 8888 EXPOSE 8888
VOLUME /app/logs VOLUME /app/logs
#COPY bin/Release/net5.0/publish/ app/ #COPY bin/Release/net5.0/publish/ app/
COPY . app/ COPY . app/
#设置容器内的时区如果不设置默认时区是标准时间比北京时间晚8个小时 #设置容器内的时区如果不设置默认时区是标准时间比北京时间晚8个小时
RUN echo "Asia/shanghai" > /etc/timezone RUN echo "Asia/shanghai" > /etc/timezone
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
# 复制发布文件到工作目录 # 复制发布文件到工作目录
#COPY . app/ #COPY . app/
WORKDIR /app WORKDIR /app
#等价于 dotnet ZR.Admin.WebApi.dll如果不指定启动端口默认在docker里面启动端口是80端口 #等价于 dotnet ZR.Admin.WebApi.dll如果不指定启动端口默认在docker里面启动端口是80端口
ENTRYPOINT ["dotnet", "ZR.Admin.WebApi.dll", "--server.urls","http://*:8888"] ENTRYPOINT ["dotnet", "ZR.Admin.WebApi.dll", "--server.urls","http://*:8888"]

View File

@ -7,97 +7,97 @@
} }
}, },
"ConnectionStrings": { "ConnectionStrings": {
"conn_db": "server=LAPTOP-STKF2M8H\\SQLEXPRESS;uid=sa;pwd=zradmin123;database=ZrAdmin;Trusted_Connection=SSPI" "conn_db": "Data Source=LAPTOP-STKF2M8H\\SQLEXPRESS;User ID=sa;Password=zradmin123;Initial Catalog=ZrAdmin;Integrated Security=SSPI", //
"conn_db_type": "1" // MySql = 0, SqlServer = 1
}, },
"conn_db_dbtype": 1, // MySql = 0, SqlServer = 1 "urls": "http://localhost:8888", //urldevServer
"urls": "http://localhost:8888", //urldevServer "corsUrls": "http://localhost:8887", //","
"corsUrls": "http://localhost:8887", //","
"JwtSettings": { "JwtSettings": {
"Issuer": "ZRAdmin.NET", "Issuer": "ZRAdmin.NET",
"Audience": "ZRAdmin.NET", "Audience": "ZRAdmin.NET",
"SecretKey": "SecretKey-ZRADMIN.NET-20210101", "SecretKey": "SecretKey-ZRADMIN.NET-20210101",
"Expire": 1440 //jwt "Expire": 1440 //jwt
}, },
"DemoMode": false, // "DemoMode": false, //
"Upload": { "Upload": {
"UploadUrl": "http://localhost:8888", "UploadUrl": "http://localhost:8888",
"localSavePath": "" ///home/website/uploads "localSavePath": "" ///home/website/uploads
}, },
// //
"ALIYUN_OSS": { "ALIYUN_OSS": {
"REGIONID": "cn-hangzhou", "REGIONID": "cn-hangzhou",
"KEY": "XX", "KEY": "XX",
"SECRET": "XX", "SECRET": "XX",
"bucketName": "bucketName", "bucketName": "bucketName",
"domainUrl": "http://xxx.xxx.com" //访 "domainUrl": "http://xxx.xxx.com" //访
}, },
"gen": { "gen": {
"conn": "server=LAPTOP-STKF2M8H\\SQLEXPRESS;user=zr;pwd=abc;database=ZrAdmin;Trusted_Connection=SSPI", "conn": "Data Source=LAPTOP-STKF2M8H\\SQLEXPRESS;User ID=sa;Password=zradmin123;Initial Catalog=ZrAdmin;Integrated Security=SSPI",
"dbType": 1, //MySql = 0, SqlServer = 1 "dbType": 1, //MySql = 0, SqlServer = 1
"autoPre": true, // "autoPre": true, //
"author": "admin", "author": "admin",
"tablePrefix": "sys_", //"表前缀(生成类名不会包含表前缀,多个用逗号分隔)", "tablePrefix": "sys_", //"表前缀(生成类名不会包含表前缀,多个用逗号分隔)",
"vuePath": "" //egD:\Work\ZRAdmin-Vue3 "vuePath": "" //egD:\Work\ZRAdmin-Vue3
}, },
// //
"MailOptions": { "MailOptions": {
// //
"From": "", //egxxxx@qq.com "From": "", //egxxxx@qq.com
// //
"Password": "123456", "Password": "123456",
// //
"Smtp": "smtp.qq.com", "Smtp": "smtp.qq.com",
"Port": 587 "Port": 587
}, },
//redis //redis
"RedisServer": { "RedisServer": {
"Cache": "127.0.0.1:6379,defaultDatabase=0,poolsize=50,ssl=false,writeBuffer=10240,prefix=cache:", "Cache": "127.0.0.1:6379,defaultDatabase=0,poolsize=50,ssl=false,writeBuffer=10240,prefix=cache:",
"Session": "127.0.0.1:6379,defaultDatabase=0,poolsize=50,ssl=false,writeBuffer=10240,prefix=session:" "Session": "127.0.0.1:6379,defaultDatabase=0,poolsize=50,ssl=false,writeBuffer=10240,prefix=session:"
}, },
// //
"IpRateLimiting": { "IpRateLimiting": {
//5访False访5访 //5访False访5访
//True5GetData访访PostData()5,5 //True5GetData访访PostData()5,5
"EnableEndpointRateLimiting": true, "EnableEndpointRateLimiting": true,
//falseAPI; 3APIAPI //falseAPI; 3APIAPI
//StackBlockedRequeststrue //StackBlockedRequeststrue
"StackBlockedRequests": false, "StackBlockedRequests": false,
"RealIpHeader": "X-Real-IP", "RealIpHeader": "X-Real-IP",
//IDIDClientWhitelist //IDIDClientWhitelist
"ClientIdHeader": "X-ClientId", "ClientIdHeader": "X-ClientId",
"HttpStatusCode": 429, "HttpStatusCode": 429,
// //
"EndpointWhitelist": [ "post:/system/dict/data/types", "*:/msghub/negotiate", "*:/LogOut" ], "EndpointWhitelist": [ "post:/system/dict/data/types", "*:/msghub/negotiate", "*:/LogOut" ],
// //
//"ClientWhitelist": [ "dev-id-1", "dev-id-2" ], //"ClientWhitelist": [ "dev-id-1", "dev-id-2" ],
"QuotaExceededResponse": { "QuotaExceededResponse": {
"Content": "{{\"code\":429,\"msg\":\"访问过于频繁,请稍后重试\"}}", "Content": "{{\"code\":429,\"msg\":\"访问过于频繁,请稍后重试\"}}",
"ContentType": "application/json", "ContentType": "application/json",
"StatusCode": 429 "StatusCode": 429
}, },
//api,* //api,*
"GeneralRules": [ "GeneralRules": [
{ {
"Endpoint": "*:/captchaImage", "Endpoint": "*:/captchaImage",
//{}{}使s, m, h, d //{}{}使s, m, h, d
"Period": "3s", "Period": "3s",
"Limit": 5 "Limit": 5
}, },
{ {
"Endpoint": "post:*", "Endpoint": "post:*",
//{}{}使s, m, h, d //{}{}使s, m, h, d
"Period": "3s", "Period": "3s",
"Limit": 1 "Limit": 1
}, },
{ {
"Endpoint": "put:*", "Endpoint": "put:*",
//{}{}使s, m, h, d //{}{}使s, m, h, d
"Period": "3s", "Period": "3s",
"Limit": 1 "Limit": 1
} }
//{ //{
// "Endpoint": "*", // "Endpoint": "*",
// //{}{}使s, m, h, d // //{}{}使s, m, h, d
// "Period": "1s", // "Period": "1s",
// "Limit": 2 // "Limit": 2
//} //}
@ -118,7 +118,7 @@
//} //}
], ],
"IpRateLimitPolicies": { "IpRateLimitPolicies": {
//ip //ip
"IpRules": [ "IpRules": [
] ]
} }

View File

@ -2,7 +2,7 @@ module.exports = {
/** /**
* 框架版本号 * 框架版本号
*/ */
version: '3.8.0', version: '3.8.1',
title: 'ZrAdmin.NET-后台管理', title: 'ZrAdmin.NET-后台管理',
/** /**
* 主题颜色 * 主题颜色

View File

@ -36,7 +36,7 @@
<p> <p>
<b>当前版本:</b> <span>v{{ version }}</span> <b>当前版本:</b> <span>v{{ version }}</span>
<el-link class="ml10" type="primary" size="mini" icon="el-icon-document" plain <el-link class="ml10" type="primary" size="mini" icon="el-icon-document" plain
@click="goTarget('http://www.izhaorui.cn/doc/#/changelog?id=v' + version)">更新日志 @click="goTarget('http://www.izhaorui.cn/doc/changelog.html#' + version)">更新日志
</el-link> </el-link>
</p> </p>
<p> <p>