-
Notifications
You must be signed in to change notification settings - Fork 38
appsettings.json and Proxies/appsettings.json should be one file #180
Comments
This is intentional, if we use the same configuration files then there is no way to have Kestrel listening on different endpoints for the proxy and hippo. In fact, I think that merging the configuration will throw an exception as I suspect both hippo and the proxy will try and listen on the same endpoint |
Why can't each I thought ASP.NET Core's best practices demonstrated one Program.cs == one appsettings file for each environment, such that Right now it looks like we have multple isn't that a bit confusing to the end user? |
Kestrel will look for its configuration under the Kestrel Node in configuration, I dont think that there is a way to change this but I will check , its possible that it can be done through an option.
One thing that we could do is to have a common base (e.g. appsettings.json, appsettings.json and then have a appsettingsHippo.json , appsettingsYarp.json these files could be used only for the specific config for those webhosts and we could place them in the same directory. |
In addition I don't think that wagi-dotnet actually needs any user defined configuration so we can probably delete those files and point it at the hippo configs. |
IConfiguration can be passed via KestrelSeverOptions, so we could have something like: "Hippo" : {
"Kestrel": {
"Endpoints": {
"Http": {
"Url": "http://localhost:5000"
},
"Https": {
"Url": "https://localhost:5001"
}
}
},
},
"Yarp" : {
"Kestrel": {
"Endpoints": {
"Http": {
"Url": "http://localhost:5002"
},
"Https": {
"Url": "https://localhost:5003"
}
}
},
} Then we would read the relevant section and configure Kestrel via options. |
Fixed in #311 |
configuration for hippo and for YARP should be controlled through one settings file. YARP configuration can be namespaced under a
Proxies
namespace or other setting. But a user should not have to maintain two separate "settings" file for each environment to configure the same program.https://github.com/deislabs/hippo/blob/main/Hippo/appsettings.json
https://github.com/deislabs/hippo/blob/main/Hippo/Proxies/appsettings.json
The text was updated successfully, but these errors were encountered: