Fixing some generic issues
This commit is contained in:
parent
dc2e7c215b
commit
60998cbd5c
@ -86,6 +86,9 @@ spec:
|
|||||||
- name: http
|
- name: http
|
||||||
containerPort: 80
|
containerPort: 80
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
- name: admin
|
||||||
|
containerPort: 8001
|
||||||
|
protocol: TCP
|
||||||
resources:
|
resources:
|
||||||
{{ toYaml .Values.resources | indent 12 }}
|
{{ toYaml .Values.resources | indent 12 }}
|
||||||
{{- with .Values.nodeSelector }}
|
{{- with .Values.nodeSelector }}
|
||||||
|
@ -14,6 +14,10 @@ spec:
|
|||||||
targetPort: http
|
targetPort: http
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
name: http
|
name: http
|
||||||
|
- port: {{ .Values.service.adminPort }}
|
||||||
|
targetPort: admin
|
||||||
|
protocol: TCP
|
||||||
|
name: admin
|
||||||
selector:
|
selector:
|
||||||
app: {{ template "apigwmm.name" . }}
|
app: {{ template "apigwmm.name" . }}
|
||||||
release: {{ .Release.Name }}
|
release: {{ .Release.Name }}
|
||||||
|
@ -9,6 +9,7 @@ image:
|
|||||||
service:
|
service:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
port: 80
|
port: 80
|
||||||
|
adminPort: 8001
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
@ -30,3 +31,15 @@ env: {}
|
|||||||
|
|
||||||
envoy:
|
envoy:
|
||||||
configPath: /etc/envoy
|
configPath: /etc/envoy
|
||||||
|
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
path: /ready
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 15
|
||||||
|
port: 8001
|
||||||
|
readiness:
|
||||||
|
path: /ready
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 60
|
||||||
|
port: 8001
|
@ -35,12 +35,12 @@ static_resources:
|
|||||||
- match:
|
- match:
|
||||||
prefix: "/o/"
|
prefix: "/o/"
|
||||||
route:
|
route:
|
||||||
prefix_rewrite: "/order-api/"
|
prefix_rewrite: "/ordering-api/"
|
||||||
cluster: ordering
|
cluster: ordering
|
||||||
- match:
|
- match:
|
||||||
prefix: "/order-api/"
|
prefix: "/ordering-api/"
|
||||||
route:
|
route:
|
||||||
cluster: catalog
|
cluster: ordering
|
||||||
- match:
|
- match:
|
||||||
prefix: "/b/"
|
prefix: "/b/"
|
||||||
route:
|
route:
|
||||||
|
@ -86,6 +86,9 @@ spec:
|
|||||||
- name: http
|
- name: http
|
||||||
containerPort: 80
|
containerPort: 80
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
- name: admin
|
||||||
|
containerPort: 8001
|
||||||
|
protocol: TCP
|
||||||
resources:
|
resources:
|
||||||
{{ toYaml .Values.resources | indent 12 }}
|
{{ toYaml .Values.resources | indent 12 }}
|
||||||
{{- with .Values.nodeSelector }}
|
{{- with .Values.nodeSelector }}
|
||||||
|
@ -14,6 +14,10 @@ spec:
|
|||||||
targetPort: http
|
targetPort: http
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
name: http
|
name: http
|
||||||
|
- port: {{ .Values.service.adminPort }}
|
||||||
|
targetPort: admin
|
||||||
|
protocol: TCP
|
||||||
|
name: admin
|
||||||
selector:
|
selector:
|
||||||
app: {{ template "apigwms.name" . }}
|
app: {{ template "apigwms.name" . }}
|
||||||
release: {{ .Release.Name }}
|
release: {{ .Release.Name }}
|
||||||
|
@ -9,6 +9,7 @@ image:
|
|||||||
service:
|
service:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
port: 80
|
port: 80
|
||||||
|
adminPort: 8001
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
@ -29,4 +30,16 @@ affinity: {}
|
|||||||
env: {}
|
env: {}
|
||||||
|
|
||||||
envoy:
|
envoy:
|
||||||
configPath: /etc/envoy
|
configPath: /etc/envoy
|
||||||
|
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
path: /ready
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 15
|
||||||
|
port: 8001
|
||||||
|
readiness:
|
||||||
|
path: /ready
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 60
|
||||||
|
port: 8001
|
@ -86,6 +86,9 @@ spec:
|
|||||||
- name: http
|
- name: http
|
||||||
containerPort: 80
|
containerPort: 80
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
- name: admin
|
||||||
|
containerPort: 8001
|
||||||
|
protocol: TCP
|
||||||
resources:
|
resources:
|
||||||
{{ toYaml .Values.resources | indent 12 }}
|
{{ toYaml .Values.resources | indent 12 }}
|
||||||
{{- with .Values.nodeSelector }}
|
{{- with .Values.nodeSelector }}
|
||||||
|
@ -14,6 +14,10 @@ spec:
|
|||||||
targetPort: http
|
targetPort: http
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
name: http
|
name: http
|
||||||
|
- port: {{ .Values.service.adminPort }}
|
||||||
|
targetPort: admin
|
||||||
|
protocol: TCP
|
||||||
|
name: admin
|
||||||
selector:
|
selector:
|
||||||
app: {{ template "apigwwm.name" . }}
|
app: {{ template "apigwwm.name" . }}
|
||||||
release: {{ .Release.Name }}
|
release: {{ .Release.Name }}
|
||||||
|
@ -9,6 +9,7 @@ image:
|
|||||||
service:
|
service:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
port: 80
|
port: 80
|
||||||
|
adminPort: 8001
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
@ -30,4 +31,16 @@ affinity: {}
|
|||||||
env: {}
|
env: {}
|
||||||
|
|
||||||
envoy:
|
envoy:
|
||||||
configPath: /etc/envoy
|
configPath: /etc/envoy
|
||||||
|
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
path: /ready
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 15
|
||||||
|
port: 8001
|
||||||
|
readiness:
|
||||||
|
path: /ready
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 60
|
||||||
|
port: 8001
|
@ -35,12 +35,12 @@ static_resources:
|
|||||||
- match:
|
- match:
|
||||||
prefix: "/o/"
|
prefix: "/o/"
|
||||||
route:
|
route:
|
||||||
prefix_rewrite: "/order-api/"
|
prefix_rewrite: "/ordering-api/"
|
||||||
cluster: ordering
|
cluster: ordering
|
||||||
- match:
|
- match:
|
||||||
prefix: "/order-api/"
|
prefix: "/ordering-api/"
|
||||||
route:
|
route:
|
||||||
cluster: catalog
|
cluster: ordering
|
||||||
- match:
|
- match:
|
||||||
prefix: "/b/"
|
prefix: "/b/"
|
||||||
route:
|
route:
|
||||||
|
@ -85,6 +85,9 @@ spec:
|
|||||||
- name: http
|
- name: http
|
||||||
containerPort: 80
|
containerPort: 80
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
- name: admin
|
||||||
|
containerPort: 8001
|
||||||
|
protocol: TCP
|
||||||
resources:
|
resources:
|
||||||
{{ toYaml .Values.resources | indent 12 }}
|
{{ toYaml .Values.resources | indent 12 }}
|
||||||
{{- with .Values.nodeSelector }}
|
{{- with .Values.nodeSelector }}
|
||||||
|
@ -14,6 +14,10 @@ spec:
|
|||||||
targetPort: http
|
targetPort: http
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
name: http
|
name: http
|
||||||
|
- port: {{ .Values.service.adminPort }}
|
||||||
|
targetPort: admin
|
||||||
|
protocol: TCP
|
||||||
|
name: admin
|
||||||
selector:
|
selector:
|
||||||
app: {{ template "apigwws.name" . }}
|
app: {{ template "apigwws.name" . }}
|
||||||
release: {{ .Release.Name }}
|
release: {{ .Release.Name }}
|
||||||
|
@ -9,6 +9,7 @@ image:
|
|||||||
service:
|
service:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
port: 80
|
port: 80
|
||||||
|
adminPort: 8001
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
@ -30,4 +31,16 @@ affinity: {}
|
|||||||
env: {}
|
env: {}
|
||||||
|
|
||||||
envoy:
|
envoy:
|
||||||
configPath: /etc/envoy
|
configPath: /etc/envoy
|
||||||
|
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
path: /ready
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 15
|
||||||
|
port: 8001
|
||||||
|
readiness:
|
||||||
|
path: /ready
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 60
|
||||||
|
port: 8001
|
@ -24,13 +24,13 @@ data:
|
|||||||
name__spa__hc: WebSPA HTTP Check
|
name__spa__hc: WebSPA HTTP Check
|
||||||
internalurls__spa__hc: http://{{ .Values.app.svc.spa }}/hc
|
internalurls__spa__hc: http://{{ .Values.app.svc.spa }}/hc
|
||||||
name__apigwws__hc: Web Shopping API GW HTTP Check
|
name__apigwws__hc: Web Shopping API GW HTTP Check
|
||||||
internalurls__apigwws__hc: http://{{ .Values.app.svc.webshoppingapigw }}/hc
|
internalurls__apigwws__hc: http://{{ .Values.app.svc.webshoppingapigw }}:8001/ready
|
||||||
name__apigwwm__hc: Web Marketing API GW HTTP Check
|
name__apigwwm__hc: Web Marketing API GW HTTP Check
|
||||||
internalurls__apigwwm__hc: http://{{ .Values.app.svc.webmarketingapigw }}/hc
|
internalurls__apigwwm__hc: http://{{ .Values.app.svc.webmarketingapigw }}:8001/ready
|
||||||
name__apigwms__hc: Mobile Shopping API GW HTTP Check
|
name__apigwms__hc: Mobile Shopping API GW HTTP Check
|
||||||
internalurls__apigwms__hc: http://{{ .Values.app.svc.mobileshoppingapigw }}/hc
|
internalurls__apigwms__hc: http://{{ .Values.app.svc.mobileshoppingapigw }}:8001/ready
|
||||||
name__apigwmm__hc: Mobile Marketing API GW HTTP Check
|
name__apigwmm__hc: Mobile Marketing API GW HTTP Check
|
||||||
internalurls__apigwmm__hc: http://{{ .Values.app.svc.mobilemarketingapigw }}/hc
|
internalurls__apigwmm__hc: http://{{ .Values.app.svc.mobilemarketingapigw }}:8001/ready
|
||||||
name__apigwwsagg__hc: Web Shopping Aggregator GW HTTP Check
|
name__apigwwsagg__hc: Web Shopping Aggregator GW HTTP Check
|
||||||
internalurls__apigwwsagg__hc: http://{{ .Values.app.svc.webshoppingagg }}/hc
|
internalurls__apigwwsagg__hc: http://{{ .Values.app.svc.webshoppingagg }}/hc
|
||||||
name__apigwmsagg__hc: Mobile Shopping Aggregator HTTP Check
|
name__apigwmsagg__hc: Mobile Shopping Aggregator HTTP Check
|
||||||
|
@ -86,6 +86,24 @@ env:
|
|||||||
key: name__payment__hc
|
key: name__payment__hc
|
||||||
- name: HealthChecks-UI__HealthChecks__12__Uri
|
- name: HealthChecks-UI__HealthChecks__12__Uri
|
||||||
key: internalurls__payment__hc
|
key: internalurls__payment__hc
|
||||||
|
|
||||||
|
- name: HealthChecks-UI__HealthChecks__13__Name
|
||||||
|
key: name__apigwws__hc
|
||||||
|
- name: HealthChecks-UI__HealthChecks__13__Uri
|
||||||
|
key: internalurls__apigwws__hc
|
||||||
|
- name: HealthChecks-UI__HealthChecks__14__Name
|
||||||
|
key: name__apigwwm__hc
|
||||||
|
- name: HealthChecks-UI__HealthChecks__14__Uri
|
||||||
|
key: internalurls__apigwwm__hc
|
||||||
|
- name: HealthChecks-UI__HealthChecks__15__Name
|
||||||
|
key: name__apigwms__hc
|
||||||
|
- name: HealthChecks-UI__HealthChecks__15__Uri
|
||||||
|
key: internalurls__apigwms__hc
|
||||||
|
- name: HealthChecks-UI__HealthChecks__16__Name
|
||||||
|
key: name__apigwmm__hc
|
||||||
|
- name: HealthChecks-UI__HealthChecks__16__Uri
|
||||||
|
key: internalurls__apigwmm__hc
|
||||||
|
|
||||||
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
|
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
|
||||||
values:
|
values:
|
||||||
- name: ASPNETCORE_ENVIRONMENT
|
- name: ASPNETCORE_ENVIRONMENT
|
||||||
|
@ -35,12 +35,12 @@ static_resources:
|
|||||||
- match:
|
- match:
|
||||||
prefix: "/o/"
|
prefix: "/o/"
|
||||||
route:
|
route:
|
||||||
prefix_rewrite: "/order-api/"
|
prefix_rewrite: "/ordering-api/"
|
||||||
cluster: ordering
|
cluster: ordering
|
||||||
- match:
|
- match:
|
||||||
prefix: "/order-api/"
|
prefix: "/ordering-api/"
|
||||||
route:
|
route:
|
||||||
cluster: catalog
|
cluster: ordering
|
||||||
- match:
|
- match:
|
||||||
prefix: "/b/"
|
prefix: "/b/"
|
||||||
route:
|
route:
|
||||||
|
@ -35,12 +35,12 @@ static_resources:
|
|||||||
- match:
|
- match:
|
||||||
prefix: "/o/"
|
prefix: "/o/"
|
||||||
route:
|
route:
|
||||||
prefix_rewrite: "/order-api/"
|
prefix_rewrite: "/ordering-api/"
|
||||||
cluster: ordering
|
cluster: ordering
|
||||||
- match:
|
- match:
|
||||||
prefix: "/order-api/"
|
prefix: "/ordering-api/"
|
||||||
route:
|
route:
|
||||||
cluster: catalog
|
cluster: ordering
|
||||||
- match:
|
- match:
|
||||||
prefix: "/b/"
|
prefix: "/b/"
|
||||||
route:
|
route:
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"IncludeScopes": false,
|
||||||
|
"Debug": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Debug"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Console": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Debug"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -2,8 +2,8 @@
|
|||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.eShopOnContainers.WebMVC;
|
using Microsoft.eShopOnContainers.WebMVC;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
using Serilog;
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
@ -13,9 +13,9 @@ namespace WebMVC.Infrastructure
|
|||||||
{
|
{
|
||||||
public class WebContextSeed
|
public class WebContextSeed
|
||||||
{
|
{
|
||||||
public static void Seed(IApplicationBuilder applicationBuilder, IHostingEnvironment env, ILoggerFactory loggerFactory)
|
public static void Seed(IApplicationBuilder applicationBuilder, IHostingEnvironment env)
|
||||||
{
|
{
|
||||||
var log = loggerFactory.CreateLogger<WebContextSeed>();
|
var log = Serilog.Log.Logger;
|
||||||
|
|
||||||
var settings = (AppSettings)applicationBuilder
|
var settings = (AppSettings)applicationBuilder
|
||||||
.ApplicationServices.GetRequiredService<IOptions<AppSettings>>().Value;
|
.ApplicationServices.GetRequiredService<IOptions<AppSettings>>().Value;
|
||||||
@ -39,7 +39,7 @@ namespace WebMVC.Infrastructure
|
|||||||
string overrideCssFile = Path.Combine(contentRootPath, "Setup", "override.css");
|
string overrideCssFile = Path.Combine(contentRootPath, "Setup", "override.css");
|
||||||
if (!File.Exists(overrideCssFile))
|
if (!File.Exists(overrideCssFile))
|
||||||
{
|
{
|
||||||
log.LogError("Override css file '{FileName}' does not exists.", overrideCssFile);
|
log.Error("Override css file '{FileName}' does not exists.", overrideCssFile);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ namespace WebMVC.Infrastructure
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
log.LogError(ex, "EXCEPTION ERROR: {Message}", ex.Message);
|
log.Error(ex, "EXCEPTION ERROR: {Message}", ex.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ namespace WebMVC.Infrastructure
|
|||||||
string imagesZipFile = Path.Combine(contentRootPath, "Setup", "images.zip");
|
string imagesZipFile = Path.Combine(contentRootPath, "Setup", "images.zip");
|
||||||
if (!File.Exists(imagesZipFile))
|
if (!File.Exists(imagesZipFile))
|
||||||
{
|
{
|
||||||
log.LogError("Zip file '{ZipFileName}' does not exists.", imagesZipFile);
|
log.Error("Zip file '{ZipFileName}' does not exists.", imagesZipFile);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,14 +81,14 @@ namespace WebMVC.Infrastructure
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
log.LogWarning("Skipped file '{FileName}' in zipfile '{ZipFileName}'", entry.Name, imagesZipFile);
|
log.Warning("Skipped file '{FileName}' in zipfile '{ZipFileName}'", entry.Name, imagesZipFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch ( Exception ex )
|
catch ( Exception ex )
|
||||||
{
|
{
|
||||||
log.LogError(ex, "EXCEPTION ERROR: {Message}", ex.Message);
|
log.Error(ex, "EXCEPTION ERROR: {Message}", ex.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,15 +53,18 @@ namespace Microsoft.eShopOnContainers.WebMVC
|
|||||||
{
|
{
|
||||||
var seqServerUrl = configuration["Serilog:SeqServerUrl"];
|
var seqServerUrl = configuration["Serilog:SeqServerUrl"];
|
||||||
var logstashUrl = configuration["Serilog:LogstashgUrl"];
|
var logstashUrl = configuration["Serilog:LogstashgUrl"];
|
||||||
return new LoggerConfiguration()
|
var cfg = new LoggerConfiguration()
|
||||||
.MinimumLevel.Verbose()
|
.ReadFrom.Configuration(configuration)
|
||||||
.Enrich.WithProperty("ApplicationContext", AppName)
|
.Enrich.WithProperty("ApplicationContext", AppName)
|
||||||
.Enrich.FromLogContext()
|
.Enrich.FromLogContext()
|
||||||
.WriteTo.Console()
|
.WriteTo.Console();
|
||||||
.WriteTo.Seq(string.IsNullOrWhiteSpace(seqServerUrl) ? "http://seq" : seqServerUrl)
|
if (!string.IsNullOrWhiteSpace(seqServerUrl)) {
|
||||||
.WriteTo.Http(string.IsNullOrWhiteSpace(logstashUrl) ? "http://logstash:8080" : logstashUrl)
|
cfg.WriteTo.Seq(seqServerUrl);
|
||||||
.ReadFrom.Configuration(configuration)
|
}
|
||||||
.CreateLogger();
|
if (!string.IsNullOrWhiteSpace(logstashUrl)) {
|
||||||
|
cfg.WriteTo.Http(logstashUrl);
|
||||||
|
}
|
||||||
|
return cfg.CreateLogger();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IConfiguration GetConfiguration()
|
private static IConfiguration GetConfiguration()
|
||||||
|
@ -19,8 +19,6 @@ namespace Microsoft.eShopOnContainers.WebMVC.Services
|
|||||||
private readonly string _basketByPassUrl;
|
private readonly string _basketByPassUrl;
|
||||||
private readonly string _purchaseUrl;
|
private readonly string _purchaseUrl;
|
||||||
|
|
||||||
private readonly string _bffUrl;
|
|
||||||
|
|
||||||
public BasketService(HttpClient httpClient, IOptions<AppSettings> settings, ILogger<BasketService> logger)
|
public BasketService(HttpClient httpClient, IOptions<AppSettings> settings, ILogger<BasketService> logger)
|
||||||
{
|
{
|
||||||
_apiClient = httpClient;
|
_apiClient = httpClient;
|
||||||
|
@ -46,7 +46,6 @@ namespace Microsoft.eShopOnContainers.WebMVC
|
|||||||
.AddCustomMvc(Configuration)
|
.AddCustomMvc(Configuration)
|
||||||
.AddDevspaces()
|
.AddDevspaces()
|
||||||
.AddHttpClientServices(Configuration);
|
.AddHttpClientServices(Configuration);
|
||||||
//.AddHttpClientLogging(Configuration) //Opt-in HttpClientLogging config
|
|
||||||
|
|
||||||
IdentityModelEventSource.ShowPII = true; // Caution! Do NOT use in production: https://aka.ms/IdentityModel/PII
|
IdentityModelEventSource.ShowPII = true; // Caution! Do NOT use in production: https://aka.ms/IdentityModel/PII
|
||||||
|
|
||||||
@ -56,12 +55,9 @@ namespace Microsoft.eShopOnContainers.WebMVC
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
|
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
|
||||||
{
|
{
|
||||||
JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Remove("sub");
|
JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Remove("sub");
|
||||||
|
|
||||||
//loggerFactory.AddAzureWebAppDiagnostics();
|
|
||||||
//loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace);
|
|
||||||
if (env.IsDevelopment())
|
if (env.IsDevelopment())
|
||||||
{
|
{
|
||||||
app.UseDeveloperExceptionPage();
|
app.UseDeveloperExceptionPage();
|
||||||
@ -75,7 +71,6 @@ namespace Microsoft.eShopOnContainers.WebMVC
|
|||||||
|
|
||||||
if (!string.IsNullOrEmpty(pathBase))
|
if (!string.IsNullOrEmpty(pathBase))
|
||||||
{
|
{
|
||||||
loggerFactory.CreateLogger<Startup>().LogDebug("Using PATH BASE '{PathBase}'", pathBase);
|
|
||||||
app.UsePathBase(pathBase);
|
app.UsePathBase(pathBase);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,7 +82,7 @@ namespace Microsoft.eShopOnContainers.WebMVC
|
|||||||
app.UseMiddleware<ByPassAuthMiddleware>();
|
app.UseMiddleware<ByPassAuthMiddleware>();
|
||||||
}
|
}
|
||||||
|
|
||||||
WebContextSeed.Seed(app, env, loggerFactory);
|
WebContextSeed.Seed(app, env);
|
||||||
|
|
||||||
app.UseRouting();
|
app.UseRouting();
|
||||||
|
|
||||||
@ -201,21 +196,6 @@ namespace Microsoft.eShopOnContainers.WebMVC
|
|||||||
return services;
|
return services;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IServiceCollection AddHttpClientLogging(this IServiceCollection services, IConfiguration configuration)
|
|
||||||
{
|
|
||||||
services.AddLogging(b =>
|
|
||||||
{
|
|
||||||
b.AddFilter((category, level) => true); // Spam the world with logs.
|
|
||||||
|
|
||||||
// Add console logger so we can see all the logging produced by the client by default.
|
|
||||||
b.AddConsole(c => c.IncludeScopes = true);
|
|
||||||
|
|
||||||
// Add console logger
|
|
||||||
b.AddDebug();
|
|
||||||
});
|
|
||||||
|
|
||||||
return services;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IServiceCollection AddCustomAuthentication(this IServiceCollection services, IConfiguration configuration)
|
public static IServiceCollection AddCustomAuthentication(this IServiceCollection services, IConfiguration configuration)
|
||||||
{
|
{
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
{
|
{
|
||||||
"Logging": {
|
"Serilog": {
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Debug"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Serilog": {
|
|
||||||
"MinimumLevel": {
|
"MinimumLevel": {
|
||||||
"Default": "Debug"
|
"Default": "Debug"
|
||||||
}
|
}
|
||||||
|
@ -15,12 +15,7 @@
|
|||||||
"SeqServerUrl": null,
|
"SeqServerUrl": null,
|
||||||
"LogstashgUrl": null,
|
"LogstashgUrl": null,
|
||||||
"MinimumLevel": {
|
"MinimumLevel": {
|
||||||
"Default": "Information",
|
"Default": "Information"
|
||||||
"Override": {
|
|
||||||
"Microsoft": "Warning",
|
|
||||||
"Microsoft.eShopOnContainers": "Information",
|
|
||||||
"System": "Warning"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ApplicationInsights": {
|
"ApplicationInsights": {
|
||||||
|
@ -1,87 +1,7 @@
|
|||||||
{
|
{
|
||||||
"HealthChecks-UI": {
|
|
||||||
"HealthChecks": [
|
|
||||||
{
|
|
||||||
"Name": "Ordering HTTP Check",
|
|
||||||
"Uri": "http://localhost:5102/hc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "Ordering HTTP Background Check",
|
|
||||||
"Uri": "http://localhost:5111/hc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "Basket HTTP Check",
|
|
||||||
"Uri": "http://localhost:5103/hc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "Catalog HTTP Check",
|
|
||||||
"Uri": "http://localhost:5101/hc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "Identity HTTP Check",
|
|
||||||
"Uri": "http://localhost:5105/hc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "Marketing HTTP Check",
|
|
||||||
"Uri": "http://localhost:5110/hc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "Locations HTTP Check",
|
|
||||||
"Uri": "http://localhost:5109/hc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "Payments HTTP Check",
|
|
||||||
"Uri": "http://localhost:5108/hc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "WebMVC HTTP Check",
|
|
||||||
"Uri": "http://localhost:5100/hc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "WebSPA HTTP Check",
|
|
||||||
"Uri": "http://localhost:5104/hc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "SignalR HTTP Check",
|
|
||||||
"Uri": "http://localhost:5112/hc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "Mobile Shopping API GW HTTP Check",
|
|
||||||
"Uri": "http://localhost:5200/hc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "Mobile Marketing API GW HTTP Check",
|
|
||||||
"Uri": "http://localhost:5201/hc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "Web Shopping API GW HTTP Check",
|
|
||||||
"Uri": "http://localhost:5202/hc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "Web Marketing API GW HTTP Check",
|
|
||||||
"Uri": "http://localhost:5203/hc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "Mobile Shopping Aggregator HTTP Check",
|
|
||||||
"Uri": "http://localhost:5120/hc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "Web Shopping Aggregator HTTP Check",
|
|
||||||
"Uri": "http://localhost:5121/hc"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"EvaluationTimeOnSeconds": 10,
|
|
||||||
"MinimumSecondsBetweenFailureNotifications": 60
|
|
||||||
},
|
|
||||||
"Serilog": {
|
"Serilog": {
|
||||||
"SeqServerUrl": "http://localhost:5341/",
|
|
||||||
"MinimumLevel": {
|
"MinimumLevel": {
|
||||||
"Default": "Information",
|
"Default": "Debug"
|
||||||
"Override": {
|
|
||||||
"Microsoft": "Warning",
|
|
||||||
"Microsoft.eShopOnContainers": "Information",
|
|
||||||
"System": "Warning"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user