Skip to content

Commit

Permalink
feature: add key-per-file config to support Docker secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
mu88 committed Nov 13, 2023
1 parent 02b7722 commit 6b3f5b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ScreenshotCreator.Api/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Configuration.AddJsonFile("appsettings.secret.json", true);
builder.Configuration
.AddJsonFile("appsettings.secret.json", true)
.AddKeyPerFile("/run/secrets", true);
builder.Services
.AddOptions<ScreenshotOptions>()
.Bind(builder.Configuration.GetSection(ScreenshotOptions.SectionName))
Expand Down

0 comments on commit 6b3f5b2

Please sign in to comment.