How can I create an ocelot.json with a dynamic service name for different environments? Like I need to create a docker gateway image, which one I can deploy with any DownstreamHostAndPorts address by using an environment variable.
In this code, I need to change localhost dynamically by the environment variable. like
env_service_url="testdomain.com" `
{
"ReRoutes": [
{
"DownstreamPathTemplate": "/api/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 5001
}
],
"UpstreamPathTemplate": "/user-api/{everything}"
}
],
"GlobalConfiguration": {
"ServiceDiscoveryProvider": {
}`enter code here`
}
`