修改oss 返回小写 +增加pgsql 测试文件
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
7001639125
commit
4026a34fcf
|
@ -326,15 +326,15 @@ namespace IRaCIS.Api.Controllers
|
||||||
|
|
||||||
var tempToken = new AliyunOSSTempToken()
|
var tempToken = new AliyunOSSTempToken()
|
||||||
{
|
{
|
||||||
AccessKeyId = credentials.AccessKeyId,
|
accessKeyId = credentials.AccessKeyId,
|
||||||
AccessKeySecret = credentials.AccessKeySecret,
|
accessKeySecret = credentials.AccessKeySecret,
|
||||||
Expiration = credentials.Expiration,
|
expiration = credentials.Expiration,
|
||||||
SecurityToken = credentials.SecurityToken,
|
securityToken = credentials.SecurityToken,
|
||||||
|
|
||||||
|
|
||||||
Region = ossOptions.region,
|
region = ossOptions.region,
|
||||||
BucketName = ossOptions.bucketName,
|
bucketName = ossOptions.bucketName,
|
||||||
ViewEndpoint = ossOptions.viewEndpoint,
|
viewEndpoint = ossOptions.viewEndpoint,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@ builder.Services.AddDynamicWebApiSetup();
|
||||||
//AutoMapper
|
//AutoMapper
|
||||||
builder.Services.AddAutoMapperSetup();
|
builder.Services.AddAutoMapperSetup();
|
||||||
//EF ORM QueryWithNoLock
|
//EF ORM QueryWithNoLock
|
||||||
builder.Services.AddEFSetup(_configuration);
|
builder.Services.AddEFSetup(_configuration,enviromentName);
|
||||||
//Http 响应压缩
|
//Http 响应压缩
|
||||||
builder.Services.AddResponseCompressionSetup();
|
builder.Services.AddResponseCompressionSetup();
|
||||||
//Swagger Api 文档
|
//Swagger Api 文档
|
||||||
|
|
|
@ -24,6 +24,14 @@
|
||||||
},
|
},
|
||||||
"applicationUrl": "http://localhost:6100"
|
"applicationUrl": "http://localhost:6100"
|
||||||
},
|
},
|
||||||
|
"IRaCIS.Test_IRC_PGSQL": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Test_IRC_PGSQL"
|
||||||
|
},
|
||||||
|
"applicationUrl": "http://localhost:6100"
|
||||||
|
},
|
||||||
"IRaCIS.Event_IRC": {
|
"IRaCIS.Event_IRC": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"launchBrowser": true,
|
"launchBrowser": true,
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace IRaCIS.Core.API
|
||||||
{
|
{
|
||||||
public static class EFSetup
|
public static class EFSetup
|
||||||
{
|
{
|
||||||
public static void AddEFSetup( this IServiceCollection services, IConfiguration configuration)
|
public static void AddEFSetup( this IServiceCollection services, IConfiguration configuration,string envName)
|
||||||
{
|
{
|
||||||
|
|
||||||
services.AddHttpContextAccessor();
|
services.AddHttpContextAccessor();
|
||||||
|
@ -38,8 +38,15 @@ namespace IRaCIS.Core.API
|
||||||
//public static readonly ILoggerFactory MyLoggerFactory = LoggerFactory.Create(builder => { builder.AddConsole(); });
|
//public static readonly ILoggerFactory MyLoggerFactory = LoggerFactory.Create(builder => { builder.AddConsole(); });
|
||||||
var logFactory = LoggerFactory.Create(builder => { builder.AddDebug(); });
|
var logFactory = LoggerFactory.Create(builder => { builder.AddDebug(); });
|
||||||
|
|
||||||
options.UseSqlServer(configuration.GetSection("ConnectionStrings:RemoteNew").Value,
|
if(envName != "Test_IRC_PGSQL")
|
||||||
contextOptionsBuilder => contextOptionsBuilder.EnableRetryOnFailure());
|
{
|
||||||
|
options.UseSqlServer(configuration.GetSection("ConnectionStrings:RemoteNew").Value,contextOptionsBuilder => contextOptionsBuilder.EnableRetryOnFailure());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
options.UseNpgsql(@"Host=106.14.89.110;Port=5432;Username=sa;Password=pgsql_pwd;Database=Test_IRC");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
options.UseLoggerFactory(logFactory);
|
options.UseLoggerFactory(logFactory);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,94 @@
|
||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Microsoft": "Warning",
|
||||||
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ConnectionStrings": {
|
||||||
|
"RemoteNew": "Server=106.14.89.110,1435;Database=Test_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
||||||
|
"Hangfire": "Server=106.14.89.110,1435;Database=Test_IRC_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
||||||
|
},
|
||||||
|
|
||||||
|
"ObjectStoreService": {
|
||||||
|
|
||||||
|
"ObjectStoreUse": "AliyunOSS",
|
||||||
|
|
||||||
|
"AliyunOSS": {
|
||||||
|
"regionId": "cn-shanghai",
|
||||||
|
"internalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com",
|
||||||
|
"endPoint": "https://oss-cn-shanghai.aliyuncs.com",
|
||||||
|
"accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
|
||||||
|
"accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
|
||||||
|
"bucketName": "zy-irc-test-store",
|
||||||
|
"roleArn": "acs:ram::1899121822495495:role/oss-upload",
|
||||||
|
"viewEndpoint": "https://zy-irc-test-store.oss-cn-shanghai.aliyuncs.com",
|
||||||
|
"region": "oss-cn-shanghai"
|
||||||
|
},
|
||||||
|
"MinIO": {
|
||||||
|
"endPoint": "hir-oss.test.extimaging.com",
|
||||||
|
"port": "443",
|
||||||
|
"useSSL": true,
|
||||||
|
"accessKey": "fbStsVYCIPKHQneeqMwD",
|
||||||
|
"secretKey": "TzgvyA3zGXMUnpilJNUlyMYHfosl1hBMl6lxPmjy",
|
||||||
|
"bucketName": "irc-test",
|
||||||
|
"viewEndpoint": "https://hir-oss.test.extimaging.com/irc-test"
|
||||||
|
},
|
||||||
|
"AWS": {
|
||||||
|
"endPoint": "s3.us-east-1.amazonaws.com",
|
||||||
|
"useSSL": true,
|
||||||
|
"accessKey": "AKIAZQ3DRSOHFPJJ6FEU",
|
||||||
|
"secretKey": "l+yjtvV7Z4jiwm/7xCYv30UeUj/SvuqqYzAwjJHf",
|
||||||
|
"bucketName": "ei-irc-test-store",
|
||||||
|
"viewEndpoint": "https://ei-irc-test-store.s3.amazonaws.com/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"BasicSystemConfig": {
|
||||||
|
|
||||||
|
"OpenUserComplexPassword": false,
|
||||||
|
|
||||||
|
"OpenSignDocumentBeforeWork": false,
|
||||||
|
|
||||||
|
"OpenTrialRelationDelete": true,
|
||||||
|
|
||||||
|
"OpenLoginLimit": false,
|
||||||
|
|
||||||
|
"LoginMaxFailCount": 5,
|
||||||
|
|
||||||
|
"LoginFailLockMinutes": 1,
|
||||||
|
|
||||||
|
"AutoLoginOutMinutes": 1,
|
||||||
|
|
||||||
|
"OpenLoginMFA": false,
|
||||||
|
|
||||||
|
"ContinuousReadingTimeMin": 120,
|
||||||
|
|
||||||
|
"ReadingRestTimeMin": 10,
|
||||||
|
"IsNeedChangePassWord": true,
|
||||||
|
|
||||||
|
"ChangePassWordDays": 90
|
||||||
|
},
|
||||||
|
|
||||||
|
"SystemEmailSendConfig": {
|
||||||
|
"Port": 465,
|
||||||
|
"Host": "smtp.qiye.aliyun.com",
|
||||||
|
"FromEmail": "test@extimaging.com",
|
||||||
|
"FromName": "Test_IRC",
|
||||||
|
"AuthorizationCode": "SHzyyl2021",
|
||||||
|
"SiteUrl": "http://irc.test.extimaging.com/login",
|
||||||
|
|
||||||
|
"OrganizationName": "Extlmaging",
|
||||||
|
"OrganizationNameCN": "Extlmaging",
|
||||||
|
"CompanyName": "Extensive Imaging",
|
||||||
|
"CompanyNameCN": "上海展影医疗科技有限公司",
|
||||||
|
"CompanyShortName": "Extensive Imaging",
|
||||||
|
"CompanyShortNameCN": "展影医疗"
|
||||||
|
},
|
||||||
|
|
||||||
|
"SystemPacsConfig": {
|
||||||
|
"Port": "11113",
|
||||||
|
"IP": "106.14.89.110"
|
||||||
|
}
|
||||||
|
}
|
|
@ -82,14 +82,14 @@ namespace IRaCIS.Core.Application.Helper
|
||||||
|
|
||||||
public class AliyunOSSTempToken
|
public class AliyunOSSTempToken
|
||||||
{
|
{
|
||||||
public string AccessKeyId { get; set; }
|
public string accessKeyId { get; set; }
|
||||||
public string AccessKeySecret { get; set; }
|
public string accessKeySecret { get; set; }
|
||||||
public string SecurityToken { get; set; }
|
public string securityToken { get; set; }
|
||||||
public string Expiration { get; set; }
|
public string expiration { get; set; }
|
||||||
|
|
||||||
public string Region { get; set; }
|
public string region { get; set; }
|
||||||
public string BucketName { get; set; }
|
public string bucketName { get; set; }
|
||||||
public string ViewEndpoint { get; set; }
|
public string viewEndpoint { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue