Updates docker config and adds HttpContext
All checks were successful
Build, Push and Run Container / build (push) Successful in 23s

Removes a redundant host config in the docker file.

Adds HttpContextAccessor to the service collection. This
component is used to provide access to the current request context.
This commit is contained in:
2025-08-16 22:04:10 +02:00
parent 31f823b51f
commit d3eb1bb66c
2 changed files with 2 additions and 1 deletions

View File

@@ -44,7 +44,7 @@ jobs:
--name automatic-parking \ --name automatic-parking \
--network traefik \ --network traefik \
--label 'traefik.enable=true' \ --label 'traefik.enable=true' \
--label 'traefik.http.routers.automatic-parking.rule=Host(`automatic-parking.app`) || Host(`tesla-connector.automatic-parking.app`)' \ --label 'traefik.http.routers.automatic-parking.rule=Host(`automatic-parking.app`)' \
--label 'traefik.http.routers.automatic-parking.entrypoints=websecure' \ --label 'traefik.http.routers.automatic-parking.entrypoints=websecure' \
--label 'traefik.http.routers.automatic-parking.tls.certresolver=le' \ --label 'traefik.http.routers.automatic-parking.tls.certresolver=le' \
--label 'traefik.http.services.automatic-parking.loadbalancer.server.port=8080' \ --label 'traefik.http.services.automatic-parking.loadbalancer.server.port=8080' \

View File

@@ -26,6 +26,7 @@ builder.Services.AddHttpClient();
builder.Services.AddRazorPages(); builder.Services.AddRazorPages();
builder.Services.AddHealthChecks() builder.Services.AddHealthChecks()
.AddAsyncCheck("", cancellationToken => Task.FromResult(HealthCheckResult.Healthy()), ["ready"]); //TODO: Check tag .AddAsyncCheck("", cancellationToken => Task.FromResult(HealthCheckResult.Healthy()), ["ready"]); //TODO: Check tag
builder.Services.AddHttpContextAccessor();
builder.Services.AddAuthentication(o => builder.Services.AddAuthentication(o =>
{ {