Fixed configs.
This commit is contained in:
parent
b7736a1891
commit
fc2e511985
2
.gitignore
vendored
2
.gitignore
vendored
@ -226,6 +226,6 @@ Thumbs.db
|
|||||||
.idea/
|
.idea/
|
||||||
|
|
||||||
# custom
|
# custom
|
||||||
/**/**/appsettings.protected.json
|
/**/**/appsettings.*.json
|
||||||
|
|
||||||
**/**/deployment.yml
|
**/**/deployment.yml
|
||||||
|
|||||||
@ -12,7 +12,7 @@ public class HostBuilderFactory<TStartup> where TStartup : class
|
|||||||
if (!string.IsNullOrWhiteSpace(baseDirectory))
|
if (!string.IsNullOrWhiteSpace(baseDirectory))
|
||||||
configurationBuilder.SetBasePath(baseDirectory);
|
configurationBuilder.SetBasePath(baseDirectory);
|
||||||
|
|
||||||
configurationBuilder.AddJsonFile("appsettings.protected.json", true);
|
configurationBuilder.AddJsonFile("appsettings.protected.json", optional: true);
|
||||||
})
|
})
|
||||||
.ConfigureWebHostDefaults(host => { host.UseStartup<TStartup>(); })
|
.ConfigureWebHostDefaults(host => { host.UseStartup<TStartup>(); })
|
||||||
.UseSerilog((ctx, logBuilder) =>
|
.UseSerilog((ctx, logBuilder) =>
|
||||||
|
|||||||
@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"Serilog": {
|
|
||||||
"WriteTo": [
|
|
||||||
{
|
|
||||||
"Name": "Console",
|
|
||||||
"Args": {
|
|
||||||
"outputTemplate": "[{Level:u3}] {Timestamp:MM-dd HH:mm:ss} {TraceId} {SourceContext:l} {Message:lj}{NewLine}{Exception}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"ConnectionStrings": {
|
|
||||||
"UsersContext": "server=localhost;port=3307;database=nocr_users;uid=root;pwd=toor"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
{
|
|
||||||
"Serilog": {
|
|
||||||
"WriteTo": [
|
|
||||||
{
|
|
||||||
"Name": "Console",
|
|
||||||
"Args": {
|
|
||||||
"outputTemplate": "[{Level:u3}] {Timestamp:MM-dd HH:mm:ss} {TraceId} {SourceContext:l} {Message:lj}{NewLine}{Exception}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "File",
|
|
||||||
"Args": {
|
|
||||||
"path": "/var/log/nocr/users-.log",
|
|
||||||
"outputTemplate": "[{Level:u3}] {Timestamp:dd-MM-yyyy HH:mm:ss} {TraceId} {SourceContext:l} {Message:lj}{NewLine}{Exception}",
|
|
||||||
"fileSizeLimitBytes": 104857600,
|
|
||||||
"rollingInterval": "Day",
|
|
||||||
"rollOnFileSizeLimit": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"ConnectionStrings": {
|
|
||||||
"UsersContext": "server=nocr-users-db;port=3306;database=nocr_users;uid=root;pwd=toor"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
{
|
|
||||||
"Serilog": {
|
|
||||||
"MinimumLevel": {
|
|
||||||
"Default": "Information"
|
|
||||||
},
|
|
||||||
"WriteTo": [
|
|
||||||
{
|
|
||||||
"Name": "Console",
|
|
||||||
"Args": {
|
|
||||||
"outputTemplate": "[{Level:u3}] {Timestamp:MM-dd HH:mm:ss} {TraceId} {SourceContext:l} {Message:lj}{NewLine}{Exception}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "File",
|
|
||||||
"Args": {
|
|
||||||
"path": "/var/log/nocr/users-.log",
|
|
||||||
"outputTemplate": "[{Level:u3}] {Timestamp:dd-MM-yyyy HH:mm:ss} {TraceId} {SourceContext:l} {Message:lj}{NewLine}{Exception}",
|
|
||||||
"fileSizeLimitBytes": 104857600,
|
|
||||||
"rollingInterval": "Day",
|
|
||||||
"rollOnFileSizeLimit": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -7,6 +7,17 @@
|
|||||||
"Microsoft.AspNetCore": "Error",
|
"Microsoft.AspNetCore": "Error",
|
||||||
"System.Net.Http.HttpClient": "Warning"
|
"System.Net.Http.HttpClient": "Warning"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"WriteTo": [
|
||||||
|
{
|
||||||
|
"Name": "Console",
|
||||||
|
"Args": {
|
||||||
|
"outputTemplate": "[{Level:u3}] {Timestamp:MM-dd HH:mm:ss} {TraceId} {SourceContext:l} {Message:lj}{NewLine}{Exception}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ConnectionStrings": {
|
||||||
|
"UsersContext": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,28 +0,0 @@
|
|||||||
{
|
|
||||||
"Serilog": {
|
|
||||||
"MinimumLevel": {
|
|
||||||
"Default": "Information"
|
|
||||||
},
|
|
||||||
"WriteTo": [
|
|
||||||
{
|
|
||||||
"Name": "Console",
|
|
||||||
"Args": {
|
|
||||||
"outputTemplate": "[{Level:u3}] {Timestamp:MM-dd HH:mm:ss} {TraceId} {SourceContext:l} {Message:lj}{NewLine}{Exception}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "File",
|
|
||||||
"Args": {
|
|
||||||
"path": "/var/log/nocr/users/nocr-users-.log",
|
|
||||||
"outputTemplate": "[{Level:u3}] {Timestamp:dd-MM-yyyy HH:mm:ss} {TraceId} {SourceContext:l} {Message:lj}{NewLine}{Exception}",
|
|
||||||
"fileSizeLimitBytes": 104857600,
|
|
||||||
"rollingInterval": "Day",
|
|
||||||
"rollOnFileSizeLimit": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"ConnectionStrings": {
|
|
||||||
"UsersContext": ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -16,6 +16,7 @@ public class DesignTimeTextMatcherContextFactory : IDesignTimeDbContextFactory<U
|
|||||||
var configuration = new ConfigurationBuilder()
|
var configuration = new ConfigurationBuilder()
|
||||||
.SetBasePath(AppDomain.CurrentDomain.BaseDirectory)
|
.SetBasePath(AppDomain.CurrentDomain.BaseDirectory)
|
||||||
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
|
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
|
||||||
|
.AddJsonFile("appsettings.protected.json", optional: true, reloadOnChange: true)
|
||||||
.AddEnvironmentVariables()
|
.AddEnvironmentVariables()
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"Development": "server=localhost;port=3307;database=nocr_users;uid=root;pwd=toor",
|
"Development": "",
|
||||||
"DockerCompose": "server=nocr-users-db;port=3306;database=nocr_users;uid=root;pwd=toor",
|
"DockerCompose": "",
|
||||||
"k8s": ""
|
"k8s": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user