Fixed config usages.
This commit is contained in:
parent
1dddca85ba
commit
ebbec35e62
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,18 +0,0 @@
|
|||||||
{
|
|
||||||
"Serilog": {
|
|
||||||
"WriteTo": [
|
|
||||||
{
|
|
||||||
"Name": "Console",
|
|
||||||
"Args": {
|
|
||||||
"outputTemplate": "[{Level:u3}] {Timestamp:MM-dd HH:mm:ss} {TraceId} {SourceContext:l} {Message:lj}{NewLine}{Exception}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"RebusRabbitMqOptions": {
|
|
||||||
"ConnectionString": "amqp://admin:admin@localhost:5672/"
|
|
||||||
},
|
|
||||||
"ConnectionStrings": {
|
|
||||||
"TextMatcherContext": "server=localhost;port=3306;database=nocr_text_matcher;uid=root;pwd=toor"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,31 +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/text-matcher/nocr-text-matcher-.log",
|
|
||||||
"outputTemplate": "[{Level:u3}] {Timestamp:dd-MM-yyyy HH:mm:ss} {TraceId} {SourceContext:l} {Message:lj}{NewLine}{Exception}",
|
|
||||||
"fileSizeLimitBytes": 104857600,
|
|
||||||
"rollingInterval": "Day",
|
|
||||||
"rollOnFileSizeLimit": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"RebusRabbitMqOptions": {
|
|
||||||
"ConnectionString": "amqp://admin:admin@nocr-rabbitmq:5672/"
|
|
||||||
},
|
|
||||||
"ConnectionStrings": {
|
|
||||||
"TextMatcherContext": "server=nocr-text-matcher-db;port=3306;database=nocr_text_matcher;uid=root;pwd=toor"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -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/text-matcher/nocr-text-matcher-.log",
|
|
||||||
"outputTemplate": "[{Level:u3}] {Timestamp:dd-MM-yyyy HH:mm:ss} {TraceId} {SourceContext:l} {Message:lj}{NewLine}{Exception}",
|
|
||||||
"fileSizeLimitBytes": 104857600,
|
|
||||||
"rollingInterval": "Day",
|
|
||||||
"rollOnFileSizeLimit": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"RebusRabbitMqOptions": {
|
|
||||||
"ConnectionString": "amqp://admin:admin@nocr-rabbitmq:5672/"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -6,11 +6,23 @@
|
|||||||
"Microsoft": "Information",
|
"Microsoft": "Information",
|
||||||
"Microsoft.AspNetCore": "Error",
|
"Microsoft.AspNetCore": "Error",
|
||||||
"System.Net.Http.HttpClient": "Warning",
|
"System.Net.Http.HttpClient": "Warning",
|
||||||
"Rebus": "Warning"
|
"Rebus": "Debug"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"WriteTo": [
|
||||||
|
{
|
||||||
|
"Name": "Console",
|
||||||
|
"Args": {
|
||||||
|
"outputTemplate": "[{Level:u3}] {Timestamp:MM-dd HH:mm:ss} {TraceId} {SourceContext:l} {Message:lj}{NewLine}{Exception}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ConnectionStrings": {
|
||||||
|
"TextMatcherContext": ""
|
||||||
},
|
},
|
||||||
"RebusRabbitMqOptions": {
|
"RebusRabbitMqOptions": {
|
||||||
|
"ConnectionString": "",
|
||||||
"InputQueueName": "nocr.text.matcher.queue",
|
"InputQueueName": "nocr.text.matcher.queue",
|
||||||
"DirectExchangeName": "nocr.direct",
|
"DirectExchangeName": "nocr.direct",
|
||||||
"TopicsExchangeName": "nocr.topics",
|
"TopicsExchangeName": "nocr.topics",
|
||||||
|
|||||||
@ -1,31 +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/text-matcher/nocr-text-matcher-.log",
|
|
||||||
"outputTemplate": "[{Level:u3}] {Timestamp:dd-MM-yyyy HH:mm:ss} {TraceId} {SourceContext:l} {Message:lj}{NewLine}{Exception}",
|
|
||||||
"fileSizeLimitBytes": 104857600,
|
|
||||||
"rollingInterval": "Day",
|
|
||||||
"rollOnFileSizeLimit": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"RebusRabbitMqOptions": {
|
|
||||||
"ConnectionString": ""
|
|
||||||
},
|
|
||||||
"ConnectionStrings": {
|
|
||||||
"TextMatcherContext": ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -16,6 +16,7 @@ public class DesignTimeTextMatcherContextFactory : IDesignTimeDbContextFactory<T
|
|||||||
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: false, reloadOnChange: true)
|
||||||
.AddEnvironmentVariables()
|
.AddEnvironmentVariables()
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"Development": "server=localhost;port=3306;database=nocr_text_matcher;uid=root;pwd=toor",
|
"Development": "",
|
||||||
"DockerCompose": "server=nocr-text-matcher-db;port=3306;database=nocr_text_matcher;uid=root;pwd=toor",
|
"DockerCompose": "",
|
||||||
"k8s": ""
|
"k8s": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user