Skip to content

Commit

Permalink
Removing docker change, see if that helps
Browse files Browse the repository at this point in the history
Adding back in the blob storage stuff
  • Loading branch information
noremacskich committed Sep 21, 2024
1 parent 027d6c1 commit 5983148
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@ HEALTHCHECK --interval=15s --timeout=60s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://0.0.0.0:8080/health || exit 1

USER $APP_UID
RUN mkdir -p /home/app/.aspnet/DataProtection-Keys
ENTRYPOINT ["dotnet", "ExpressedRealms.Server.dll"]
8 changes: 7 additions & 1 deletion api/ExpressedRealms.Server/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@

builder.Host.UseSerilog();


// Since we are in a container, we need to keep track of the data keys manually
string blobStorageEndpoint = Environment.GetEnvironmentVariable("AZURE_STORAGEBLOB_RESOURCEENDPOINT") ?? "";
if (!string.IsNullOrEmpty(blobStorageEndpoint))
{
builder.Services.AddDataProtection()
.PersistKeysToAzureBlobStorage(new Uri(blobStorageEndpoint), new DefaultAzureCredential());
}

Log.Information("Add in Healthchecks");

Expand Down

0 comments on commit 5983148

Please sign in to comment.