From d1a363d274f47cd0a3b04ba7e93a0ba5b29cc9db Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Fri, 1 Apr 2022 02:27:32 +0300 Subject: [PATCH 1/3] added Docker environment files --- .../appsettings.Docker.json | 100 ++++++++++++++++++ .../appsettings.Docker.json | 46 ++++++++ 2 files changed, 146 insertions(+) create mode 100644 gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Docker.json create mode 100644 services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.Docker.json diff --git a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Docker.json b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Docker.json new file mode 100644 index 00000000..6e3ee56f --- /dev/null +++ b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Docker.json @@ -0,0 +1,100 @@ +{ + "ReverseProxy": { + "Routes": { + "Account Service": { + "ClusterId": "accountCluster", + "Match": { + "Path": "/api/account/{**everything}" + } + }, + "Administration Service": { + "ClusterId": "administrationCluster", + "Match": { + "Path": "/api/abp/{**everything}" + } + }, + "Catalog Service": { + "ClusterId": "catalogCluster", + "Match": { + "Path": "/api/catalog/{**everything}" + } + }, + "Basket Service": { + "ClusterId": "basketCluster", + "Match": { + "Path": "/api/basket/{**everything}" + } + }, + "Ordering Service": { + "ClusterId": "orderingCluster", + "Match": { + "Path": "/api/ordering/{**everything}" + } + }, + "Payment Service": { + "ClusterId": "paymentCluster", + "Match": { + "Path": "/api/payment/{**everything}" + } + }, + "product-picture-route": { + "ClusterId": "productPictureCluster", + "Match": { + "Path": "/product-images/{**everything}", + "Methods" : [ "GET" ] + } + } + }, + "Clusters": { + "accountCluster": { + "Destinations": { + "destination1": { + "Address": "http://app-authserver" + } + } + }, + "administrationCluster": { + "Destinations": { + "destination1": { + "Address": "http://administration-service" + } + } + }, + "catalogCluster": { + "Destinations": { + "destination1": { + "Address": "http://catalog-service" + } + } + }, + "basketCluster": { + "Destinations": { + "destination1": { + "Address": "http://basket-service" + } + } + }, + "orderingCluster": { + "Destinations": { + "destination1": { + "Address": "http://ordering-service" + } + } + }, + "paymentCluster": { + "Destinations": { + "destination1": { + "Address": "http://payment-service" + } + } + }, + "productPictureCluster": { + "Destinations": { + "destination1": { + "Address": "http://catalog-service" + } + } + } + } + } +} diff --git a/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.Docker.json b/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.Docker.json new file mode 100644 index 00000000..56ef68b6 --- /dev/null +++ b/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.Docker.json @@ -0,0 +1,46 @@ +{ + "App": { + "SelfUrl": "https://catalog-service", + "CorsOrigins": "https://gateway-web,gateway-web-public" + }, + "AuthServer": { + "Authority": "http://app-authserver", + "RequireHttpsMetadata": "false", + "SwaggerClientId": "WebGateway_Swagger", + "SwaggerClientSecret": "1q2w3e*" + }, + "ConnectionStrings": { + "CatalogService": "mongodb://mongodb/EShopOnAbp_Catalog", + "AdministrationService": "User ID=postgres;Password=myPassw0rd;Host=postgres-db;Port=5432;Database=EShopOnAbp_Administration;Pooling=false;" + }, + "Redis": { + "Configuration": "redis" + }, + "RabbitMQ": { + "Connections": { + "Default": { + "HostName": "rabbitmq" + } + }, + "EventBus": { + "ClientName": "EShopOnAbp_CatalogService", + "ExchangeName": "EShopOnAbp" + } + }, + "Kestrel": { + "Endpoints": { + "Http": { + "Url": "http://docker.host.internal:80", + "Protocols": "Http1AndHttp2" + }, + "Https": { + "Url": "https://docker.host.internal:443", + "Protocols": "Http1AndHttp2" + }, + "gRPC": { + "Url": "http://docker.host.internal:81", + "Protocols": "Http2" + } + } + } +} From 6976d0edc20e1bc80a4b2523b9642a60b07627a5 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Fri, 1 Apr 2022 02:28:22 +0300 Subject: [PATCH 2/3] Catalog service environment update --- .../appsettings.Development.json | 16 ++++++++++++++++ .../appsettings.json | 12 ------------ .../appsettings.secrets.json | 2 -- 3 files changed, 16 insertions(+), 14 deletions(-) delete mode 100644 services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.secrets.json diff --git a/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.Development.json b/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.Development.json index 2c63c085..67b24d2b 100644 --- a/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.Development.json +++ b/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.Development.json @@ -1,2 +1,18 @@ { + "Kestrel": { + "Endpoints": { + "Http": { + "Url": "http://localhost:5000", + "Protocols": "Http1AndHttp2" + }, + "Https": { + "Url": "https://localhost:44354", + "Protocols": "Http1AndHttp2" + }, + "gRPC": { + "Url": "http://localhost:81", + "Protocols": "Http2" + } + } + } } diff --git a/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.json b/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.json index 5d2eda53..7b5799db 100644 --- a/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.json +++ b/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.json @@ -40,17 +40,5 @@ }, "ElasticSearch": { "Url": "http://localhost:9200" - }, - "Kestrel": { - "Endpoints": { - "Http": { - "Url": "https://localhost:44354", - "Protocols": "Http1AndHttp2" - }, - "gRPC": { - "Url": "http://localhost:81", - "Protocols": "Http2" - } - } } } diff --git a/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.secrets.json b/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.secrets.json deleted file mode 100644 index 7a73a41b..00000000 --- a/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.secrets.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file From 06f00c09500cb425a8c3c54ebc5b93a5181dd780 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Fri, 1 Apr 2022 02:28:33 +0300 Subject: [PATCH 3/3] public-web-gateway environment update --- .../appsettings.Development.json | 16 +++ .../appsettings.Staging.json | 100 ++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Staging.json diff --git a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Development.json b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Development.json index 8983e0fc..39410514 100644 --- a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Development.json +++ b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Development.json @@ -5,5 +5,21 @@ "Microsoft": "Warning", "Microsoft.Hosting.Lifetime": "Information" } + }, + "Kestrel": { + "Endpoints": { + "Http": { + "Url": "http://localhost:5000", + "Protocols": "Http1AndHttp2" + }, + "Https": { + "Url": "https://localhost:44354", + "Protocols": "Http1AndHttp2" + }, + "gRPC": { + "Url": "http://localhost:81", + "Protocols": "Http2" + } + } } } diff --git a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Staging.json b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Staging.json new file mode 100644 index 00000000..c4e04d13 --- /dev/null +++ b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Staging.json @@ -0,0 +1,100 @@ +{ + "ReverseProxy": { + "Routes": { + "Account Service": { + "ClusterId": "accountCluster", + "Match": { + "Path": "/api/account/{**everything}" + } + }, + "Administration Service": { + "ClusterId": "administrationCluster", + "Match": { + "Path": "/api/abp/{**everything}" + } + }, + "Catalog Service": { + "ClusterId": "catalogCluster", + "Match": { + "Path": "/api/catalog/{**everything}" + } + }, + "Basket Service": { + "ClusterId": "basketCluster", + "Match": { + "Path": "/api/basket/{**everything}" + } + }, + "Ordering Service": { + "ClusterId": "orderingCluster", + "Match": { + "Path": "/api/ordering/{**everything}" + } + }, + "Payment Service": { + "ClusterId": "paymentCluster", + "Match": { + "Path": "/api/payment/{**everything}" + } + }, + "product-picture-route": { + "ClusterId": "productPictureCluster", + "Match": { + "Path": "/product-images/{**everything}", + "Methods" : [ "GET" ] + } + } + }, + "Clusters": { + "accountCluster": { + "Destinations": { + "destination1": { + "Address": "http://eshop-st-authserver" + } + } + }, + "administrationCluster": { + "Destinations": { + "destination1": { + "Address": "http://eshop-st-administration" + } + } + }, + "catalogCluster": { + "Destinations": { + "destination1": { + "Address": "http://eshop-st-catalog" + } + } + }, + "basketCluster": { + "Destinations": { + "destination1": { + "Address": "http://eshop-st-basket" + } + } + }, + "orderingCluster": { + "Destinations": { + "destination1": { + "Address": "http://eshop-st-ordering" + } + } + }, + "paymentCluster": { + "Destinations": { + "destination1": { + "Address": "http://eshop-st-payment" + } + } + }, + "productPictureCluster": { + "Destinations": { + "destination1": { + "Address": "http://eshop-st-catalog" + } + } + } + } + } +}