diff --git a/src/Nocr.TelegramClient.Host/Dockerfile b/src/Nocr.TelegramClient.Host/Dockerfile index a975556..31faafe 100644 --- a/src/Nocr.TelegramClient.Host/Dockerfile +++ b/src/Nocr.TelegramClient.Host/Dockerfile @@ -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/* FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /src diff --git a/src/Nocr.TelegramClient.Host/Infrastructure/Startup.cs b/src/Nocr.TelegramClient.Host/Infrastructure/Startup.cs index a27a1be..f8ff2cc 100644 --- a/src/Nocr.TelegramClient.Host/Infrastructure/Startup.cs +++ b/src/Nocr.TelegramClient.Host/Infrastructure/Startup.cs @@ -42,6 +42,7 @@ public class Startup .WithPolling(polling => polling.WithExceptionHandler())); services.AddTelegramBotHandling(typeof(BotClient).Assembly); + services.AddHealthChecks(); services.Configure(Configuration.GetSection(nameof(RebusRabbitMqOptions))); services.AddRebus((builder, ctx) => builder.Transport(t => @@ -58,6 +59,8 @@ public class Startup public void Configure(IApplicationBuilder app) { + app.UseHealthChecks("/health"); + var bus = app.ApplicationServices.GetRequiredService(); bus.Advanced.Topics.Subscribe("nocr.text.matcher.matched").GetAwaiter().GetResult(); }