Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: health checks #27

Merged
merged 15 commits into from
Jan 13, 2023
4 changes: 2 additions & 2 deletions docker/nginx/devstore.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ server {
server_name $hostname;

location /status {
rewrite ^/status(.*)$ http://localhost:7510/status$1 redirect;
rewrite ^/status(.*)$ http://localhost:7510/$1 redirect;
}
location / {
proxy_pass http://web-mvc;
Expand Down Expand Up @@ -40,7 +40,7 @@ server {
ssl_certificate /etc/nginx/nerdstore-certificate.pem;
ssl_certificate_key /etc/nginx/nerdstore-certificate.key;
location /status {
rewrite ^/status(.*)$ https://localhost:7511/status$1 redirect;
rewrite ^/status(.*)$ https://localhost:7511/$1 redirect;
}
location / {
proxy_pass http://web-mvc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@
}
},

"ShoppingCartUrl": "https://devstore-api-cart",
"CatalogUrl": "https://devstore-api-catalog",
"CustomerUrl": "https://devstore-api-customers",
"PaymentUrl": "https://devstore-api-billing",
"OrderUrl": "https://devstore-api-order",
"ShoppingCartUrl": "https://api-cart",
"CatalogUrl": "https://api-catalog",
"CustomerUrl": "https://api-customers",
"PaymentUrl": "https://api-billing",
"OrderUrl": "https://api-order",

"MessageQueueConnection": {
"MessageBus": "host=devstore-rabbit:5672;publisherConfirms=true;timeout=30;username=devstore;password=devstore"
},
"AppSettings": {
"JwksUri": "https://devstore-api-identity/jwks",
"JwksUri": "https://api-identity/jwks",
"Issuer": "https://devstore.academy",
"Audience": "DevStore"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using DevStore.Core.Utils;
using DevStore.WebAPI.Core.DatabaseFlavor;
using EasyNetQ;
using EasyNetQ.ConnectionString;
using HealthChecks.RabbitMQ;
using HealthChecks.UI.Client;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
Expand Down
3 changes: 2 additions & 1 deletion src/web/DevStore.WebApp.Status/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
app.MapHealthChecksUI(setup =>
{
setup.AddCustomStylesheet("devstore.css");
setup.UIPath = "/status";
setup.UIPath = "/";
setup.PageTitle = "DevStore - Status";
});
app.Run();
2 changes: 1 addition & 1 deletion src/web/DevStore.WebApp.Status/appsettings.Production.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"DefaultConnection": "Server=database-status;Database=DSStatus;MultipleActiveResultSets=true;User Id=sa;Password=MyDB@123"
},
"ENDPOINTS": [
"Frontend Web;https://web-devstore-ecommerce/healthz-infra",
"Frontend Web;https://web-devstore-ecommerce/healthz",
"Identity API;https://api-identity/healthz-infra",
"BFF Checkout;https://api-bff-checkout/healthz-infra",
"Shopping Cart API;https://api-cart/healthz-infra",
Expand Down