♻️ feat(新增): 环境变量配置
This commit is contained in:
parent
acb93ca2c9
commit
a5953af186
|
@ -35,6 +35,7 @@ public class EfCoreContext : DbContext
|
|||
protected override void OnConfiguring(DbContextOptionsBuilder options)
|
||||
{
|
||||
options.UseSqlServer(DbPath).AddInterceptors(new TransactionInterceptor());
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -2,14 +2,24 @@
|
|||
"profiles": {
|
||||
"http": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": false,
|
||||
"launchUrl": "bunnyDocs",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "http://localhost:8900/bunnyDocs",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"dotnetRunMessages": false,
|
||||
"dotnetRunMessages": true,
|
||||
"applicationUrl": "http://*:8900"
|
||||
},
|
||||
"https": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "https://localhost:8848/bunnyDocs",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"dotnetRunMessages": true,
|
||||
"applicationUrl": "https://*:8848"
|
||||
},
|
||||
"Container (Dockerfile)": {
|
||||
"commandName": "Docker",
|
||||
"launchBrowser": true,
|
||||
|
@ -22,7 +32,7 @@
|
|||
"useSSL": true
|
||||
}
|
||||
},
|
||||
"$schema": "http://json.schemastore.org/launchsettings.json",
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
|
|
|
@ -5,5 +5,27 @@
|
|||
"Microsoft.AspNetCore": "Warning",
|
||||
"Microsoft.EntityFrameworkCore": "Information"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"DataBase": {
|
||||
"DataBaseConnection": "192.168.3.98;Initial Catalog=BunnyDemo;TrustServerCertificate=True;Persist Security Info=True;User ID=sa;Password=abc1234.",
|
||||
"TimeOut": 6
|
||||
},
|
||||
"JWT": {
|
||||
"Issuer": "Issuer",
|
||||
"Audience": "Audience"
|
||||
},
|
||||
"Redis": {
|
||||
"Host": "47.120.65.66",
|
||||
"Port": "6379",
|
||||
"Password": "02120212",
|
||||
"DefaultDB": 6,
|
||||
"AsyncTimeout": 300
|
||||
},
|
||||
"Minio": {
|
||||
"Url": "192.168.3.98:9000",
|
||||
"AccessKey": "bunny",
|
||||
"SecretKey": "02120212",
|
||||
"BucketName": "csharp-test"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning",
|
||||
"Microsoft.EntityFrameworkCore": "Information"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"DataBase": {
|
||||
"DataBaseConnection": "192.168.3.98;Initial Catalog=BunnyDemo;TrustServerCertificate=True;Persist Security Info=True;User ID=sa;Password=abc1234.",
|
||||
"TimeOut": 6
|
||||
},
|
||||
"JWT": {
|
||||
"Issuer": "Issuer",
|
||||
"Audience": "Audience"
|
||||
},
|
||||
"Redis": {
|
||||
"Host": "47.120.65.66",
|
||||
"Port": "6379",
|
||||
"Password": "02120212",
|
||||
"DefaultDB": 6,
|
||||
"AsyncTimeout": 300
|
||||
},
|
||||
"Minio": {
|
||||
"Url": "192.168.3.98:9000",
|
||||
"AccessKey": "bunny",
|
||||
"SecretKey": "02120212",
|
||||
"BucketName": "csharp-test"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue