added healthcheks.
This commit is contained in:
parent
56734b4f52
commit
a35e616753
@ -1,5 +1,6 @@
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
|
||||
WORKDIR /app
|
||||
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
|
||||
EXPOSE 80
|
||||
EXPOSE 443
|
||||
|
||||
|
||||
@ -30,6 +30,8 @@ public class Startup
|
||||
|
||||
services.AddAppServices();
|
||||
services.AddEfPersistence(Configuration.GetConnectionString(nameof(TextMatcherContext))!);
|
||||
|
||||
services.AddHealthChecks();
|
||||
|
||||
services.Configure<RebusRabbitMqOptions>(Configuration.GetSection(nameof(RebusRabbitMqOptions)));
|
||||
services.AddRebus((builder, ctx) =>
|
||||
@ -54,6 +56,7 @@ public class Startup
|
||||
}
|
||||
|
||||
app.UseRouting();
|
||||
app.UseHealthChecks("/health");
|
||||
app.UseEndpoints(builder => builder.MapControllers());
|
||||
|
||||
var rabbitMqOptions = app.ApplicationServices.GetRequiredService<IOptions<RebusRabbitMqOptions>>();
|
||||
|
||||
@ -25,9 +25,10 @@
|
||||
<Content Include="..\..\.dockerignore">
|
||||
<Link>.dockerignore</Link>
|
||||
</Content>
|
||||
<Content Include="appsettings.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Update="appsettings*.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user