From ebb38a987f2e7c3a0891f8e5d111e6cdaf1bd8e9 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Tue, 29 Mar 2022 02:19:09 +0300 Subject: [PATCH] moved yarp settings to appsettings docker-compose can not override yarp.json. Maybe use in appsettings json file --- .../appsettings.json | 98 ++++++++++++++++++ .../src/EShopOnAbp.WebPublicGateway/yarp.json | 99 +------------------ 2 files changed, 99 insertions(+), 98 deletions(-) diff --git a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.json b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.json index f1417cac..936faa9b 100644 --- a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.json +++ b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.json @@ -22,5 +22,103 @@ }, "ElasticSearch": { "Url": "http://localhost:9200" + }, + "ReverseProxy": { + "Routes": { + "Account Service": { + "ClusterId": "account_cluster", + "Match": { + "Path": "/api/account/{**everything}" + } + }, + "Administration Service": { + "ClusterId": "administration_cluster", + "Match": { + "Path": "/api/abp/{**everything}" + } + }, + "Catalog Service": { + "ClusterId": "catalog_cluster", + "Match": { + "Path": "/api/catalog/{**everything}" + } + }, + "Basket Service": { + "ClusterId": "basket_cluster", + "Match": { + "Path": "/api/basket/{**everything}" + } + }, + "Ordering Service": { + "ClusterId": "ordering_cluster", + "Match": { + "Path": "/api/ordering/{**everything}" + } + }, + "Payment Service": { + "ClusterId": "payment_cluster", + "Match": { + "Path": "/api/payment/{**everything}" + } + }, + "product-picture-route": { + "ClusterId": "product_picture_cluster", + "Match": { + "Path": "/product-images/{**everything}", + "Methods" : [ "GET" ] + } + } + }, + "Clusters": { + "account-cluster": { + "Destinations": { + "destination1": { + "Address": "https://localhost:44330" + } + } + }, + "administration_cluster": { + "Destinations": { + "destination1": { + "Address": "http://localhost:44353" + } + } + }, + "catalog_cluster": { + "Destinations": { + "destination1": { + "Address": "https://localhost:44354" + } + } + }, + "product_picture_cluster": { + "Destinations": { + "destination1": { + "Address": "https://localhost:44354" + } + } + }, + "basket_cluster": { + "Destinations": { + "destination1": { + "Address": "https://localhost:44355" + } + } + }, + "ordering_cluster": { + "Destinations": { + "destination1": { + "Address": "https://localhost:44356" + } + } + }, + "payment_cluster": { + "Destinations": { + "destination1": { + "Address": "https://localhost:44357" + } + } + } + } } } diff --git a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/yarp.json b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/yarp.json index 7e3b617a..19682d92 100644 --- a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/yarp.json +++ b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/yarp.json @@ -1,100 +1,3 @@ { - "ReverseProxy": { - "Routes": { - "Account Service": { - "ClusterId": "account-cluster", - "Match": { - "Path": "/api/account/{**everything}" - } - }, - "Administration Service": { - "ClusterId": "administration-cluster", - "Match": { - "Path": "/api/abp/{**everything}" - } - }, - "Catalog Service": { - "ClusterId": "catalog-cluster", - "Match": { - "Path": "/api/catalog/{**everything}" - } - }, - "Basket Service": { - "ClusterId": "basket-cluster", - "Match": { - "Path": "/api/basket/{**everything}" - } - }, - "Ordering Service": { - "ClusterId": "ordering-cluster", - "Match": { - "Path": "/api/ordering/{**everything}" - } - }, - "Payment Service": { - "ClusterId": "payment-cluster", - "Match": { - "Path": "/api/payment/{**everything}" - } - }, - "product-picture-route": { - "ClusterId": "product-picture-cluster", - "Match": { - "Path": "/product-images/{**everything}", - "Methods" : [ "GET" ] - } - } - }, - "Clusters": { - "account-cluster": { - "Destinations": { - "destination1": { - "Address": "https://localhost:44330" - } - } - }, - "administration-cluster": { - "Destinations": { - "destination1": { - "Address": "https://localhost:44353" - } - } - }, - "catalog-cluster": { - "Destinations": { - "destination1": { - "Address": "https://localhost:44354" - } - } - }, - "product-picture-cluster": { - "Destinations": { - "destination1": { - "Address": "https://localhost:44354" - } - } - }, - "basket-cluster": { - "Destinations": { - "destination1": { - "Address": "https://localhost:44355" - } - } - }, - "ordering-cluster": { - "Destinations": { - "destination1": { - "Address": "https://localhost:44356" - } - } - }, - "payment-cluster": { - "Destinations": { - "destination1": { - "Address": "https://localhost:44357" - } - } - } - } - } + } \ No newline at end of file