Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

[Proxies] production environment MUST load appsettings.Production.json #214

Closed
bacongobbler opened this issue Aug 10, 2021 · 1 comment · Fixed by #215
Closed

[Proxies] production environment MUST load appsettings.Production.json #214

bacongobbler opened this issue Aug 10, 2021 · 1 comment · Fixed by #215
Labels
bug Something isn't working

Comments

@bacongobbler
Copy link
Contributor

bacongobbler commented Aug 10, 2021

This is in contrast to ASP.NET's convention where production data is generally hosted in appsettings.json and optionally overridden by other environment-specific settings.

This is likely due to this line marking the file as mandatory via the optional flag:

.AddJsonFile($"appsettings.{hostingContext.HostingEnvironment.EnvironmentName}.json", optional: false, reloadOnChange: true)

If the file is not present, hippo-server fails to run.

I imagine the same would apply if I set the environment to something else like ASPNETCORE_ENVIRONMENT=Staging.

@bacongobbler bacongobbler added the bug Something isn't working label Aug 10, 2021
@bacongobbler
Copy link
Contributor Author

bacongobbler commented Aug 10, 2021

Most of this issue stems from the fact that there's an appsettings.json as well as an appsettings.Development.json file for YARP, but no appsettings.Production.json file.

Based on the content of appsettings.json I'm assuming this was meant to be what hippo should use as production configuration.

OTOH Hippo (the API server) does not require an appsettings.Production.json file to be present to run.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant