fix: configure Data Protection to persist keys using a docker volume
Deploy Telegram Bot / deploy (push) Successful in 2m52s

This commit is contained in:
2026-04-17 13:35:49 +03:00
parent 052cfc3521
commit 09979252f7
2 changed files with 9 additions and 0 deletions
+5
View File
@@ -2,6 +2,7 @@ using GmRelay.Web.Components;
using GmRelay.Web.Services;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.DataProtection;
using System.Security.Claims;
using Telegram.Bot;
using Npgsql;
@@ -11,6 +12,10 @@ var builder = WebApplication.CreateBuilder(args);
// Add Aspire service defaults
builder.AddServiceDefaults();
// Add Data Protection
builder.Services.AddDataProtection()
.PersistKeysToFileSystem(new DirectoryInfo("/app/dataprotection-keys"));
// Add Npgsql
builder.AddNpgsqlDataSource("gmrelaydb");