Documentation and Samples for new IWebJobsConfigurationStartup support
brettsam opened this issue · 5 comments
brettsam commented
This is a tracking issue that will be updated with a link to documentation and samples once they are merged.
fabiocav commented
FYI, @anthonychu ; not sure if Brett has worked with you on this yet, but I'll reach out for context
fabiocav commented
This is in progress.
brettsam commented
HiroyukiSakoh commented
@brettsam @fabiocav
To prioritize AppService-Settings as well as ASP.NET Core + Web Apps,
I think the implementation would look like this.
builder.ConfigurationBuilder
.AddJsonFile(Path.Combine(context.ApplicationRootPath, "appsettings.json"), optional: true, reloadOnChange: false)
.AddJsonFile(Path.Combine(context.ApplicationRootPath, $"appsettings.{context.EnvironmentName}.json"), optional: true, reloadOnChange: false)
.AddEnvironmentVariables();
I think the sample should be modified.
https://devblogs.microsoft.com/premier-developer/order-of-precedence-when-configuring-asp-net-core/
anthonychu commented
Thanks @HiroyukiSakoh. I've submitted a change to the doc sample to add environment variables last. Should be live in the next 24 hours.