fix: configure Data Protection to persist keys using a docker volume
Deploy Telegram Bot / deploy (push) Successful in 2m52s
Deploy Telegram Bot / deploy (push) Successful in 2m52s
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user