Ocelot config via volumes
This commit is contained in:
parent
6cc87fc80a
commit
3b2c80e6d3
12
.gitattributes
vendored
12
.gitattributes
vendored
@ -69,3 +69,15 @@
|
||||
###############################################################################
|
||||
*.pfx binary
|
||||
|
||||
################################################################################
|
||||
# Ocelot config files are shared via volumes, so its EOL are important
|
||||
################################################################################
|
||||
/src/Apigw/configs/linux/mobilemarketingapigw/configuration.json text eol=lf
|
||||
/src/Apigw/configs/linux/mobileshoppingapigw/configuration.json text eol=lf
|
||||
/src/Apigw/configs/linux/webmarketingapigw/configuration.json text eol=lf
|
||||
/src/Apigw/configs/linux/webshoppingapigw/configuration.json text eol=lf
|
||||
|
||||
/src/Apigw/configs/windows/mobilemarketingapigw/configuration.json text eol=crlf
|
||||
/src/Apigw/configs/windows/mobileshoppingapigw/configuration.json text eol=crlf
|
||||
/src/Apigw/configs/windows/webmarketingapigw/configuration.json text eol=crlf
|
||||
/src/Apigw/configs/windows/webshoppingapigw/configuration.json text eol=crlf
|
@ -218,12 +218,42 @@ services:
|
||||
- "15672:15672"
|
||||
- "5672:5672"
|
||||
|
||||
apigw:
|
||||
mobileshoppingapigw:
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=Development
|
||||
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
|
||||
ports:
|
||||
- "5200:80"
|
||||
volumes:
|
||||
- ./src/Apigw/configs/mobileshoppingapigw:/app/configuration
|
||||
|
||||
mobilemarketingapigw:
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=Development
|
||||
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
|
||||
ports:
|
||||
- "5201:80"
|
||||
volumes:
|
||||
- ./src/Apigw/configs/mobilemarketingapigw:/app/configuration
|
||||
|
||||
webshoppingapigw:
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=Development
|
||||
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
|
||||
ports:
|
||||
- "5202:80"
|
||||
volumes:
|
||||
- ./src/Apigw/configs/webshoppingapigw:/app/configuration
|
||||
|
||||
|
||||
webmarketingapigw:
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=Development
|
||||
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
|
||||
ports:
|
||||
- "5203:80"
|
||||
volumes:
|
||||
- ./src/Apigw/configs/webmarketingapigw:/app/configuration
|
||||
|
||||
mobileshoppingagg:
|
||||
environment:
|
||||
|
@ -108,7 +108,25 @@ services:
|
||||
rabbitmq:
|
||||
image: rabbitmq:3-management-alpine
|
||||
|
||||
apigw:
|
||||
mobileshoppingapigw:
|
||||
image: eshop/ocelotapigw
|
||||
build:
|
||||
context: .
|
||||
dockerfile: src/Apigw/OcelotApiGw/Dockerfile
|
||||
|
||||
mobilemarketingapigw:
|
||||
image: eshop/ocelotapigw
|
||||
build:
|
||||
context: .
|
||||
dockerfile: src/Apigw/OcelotApiGw/Dockerfile
|
||||
|
||||
webshoppingapigw:
|
||||
image: eshop/ocelotapigw
|
||||
build:
|
||||
context: .
|
||||
dockerfile: src/Apigw/OcelotApiGw/Dockerfile
|
||||
|
||||
webmarketingapigw:
|
||||
image: eshop/ocelotapigw
|
||||
build:
|
||||
context: .
|
||||
|
@ -105,6 +105,18 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Aggregators", "Aggregators"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mobile.Shopping.HttpAggregator", "src\Aggregators\Mobile.Shopping.HttpAggregator\Mobile.Shopping.HttpAggregator.csproj", "{6E99F232-1536-424F-A28C-91692C8FD325}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "configs", "configs", "{D8D24753-8421-40EE-8FE5-B8BE06A07AC5}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MobileBff.Shopping.ApiGw", "MobileBff.Shopping.ApiGw", "{DAEA3807-1578-4B43-9033-E400FAF1DC49}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
src\Apigw\configs\mobileshoppingapigw\configuration.json = src\Apigw\configs\mobileshoppingapigw\configuration.json
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MobileBff.Marketing.ApiGw", "MobileBff.Marketing.ApiGw", "{AC3EDABD-8EB0-4045-BC12-39865490A79D}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
src\Apigw\configs\mobilemarketingapigw\configuration.json = src\Apigw\configs\mobilemarketingapigw\configuration.json
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Ad-Hoc|Any CPU = Ad-Hoc|Any CPU
|
||||
@ -1465,6 +1477,9 @@ Global
|
||||
{E0C5162E-DF26-4341-9E51-14AE800D7505} = {7A58AA20-67F3-48F3-88C8-24EBFE621792}
|
||||
{EA378316-9D49-4A6B-858E-D4A25F948A74} = {932D8224-11F6-4D07-B109-DA28AD288A63}
|
||||
{6E99F232-1536-424F-A28C-91692C8FD325} = {EA378316-9D49-4A6B-858E-D4A25F948A74}
|
||||
{D8D24753-8421-40EE-8FE5-B8BE06A07AC5} = {7A58AA20-67F3-48F3-88C8-24EBFE621792}
|
||||
{DAEA3807-1578-4B43-9033-E400FAF1DC49} = {D8D24753-8421-40EE-8FE5-B8BE06A07AC5}
|
||||
{AC3EDABD-8EB0-4045-BC12-39865490A79D} = {D8D24753-8421-40EE-8FE5-B8BE06A07AC5}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {25728519-5F0F-4973-8A64-0A81EB4EA8D9}
|
||||
|
@ -0,0 +1 @@
|
||||
{}
|
@ -0,0 +1 @@
|
||||
{}
|
@ -0,0 +1 @@
|
||||
{}
|
@ -0,0 +1 @@
|
||||
{}
|
@ -0,0 +1 @@
|
||||
{}
|
@ -0,0 +1 @@
|
||||
{}
|
142
src/Apigw/configs/windows/webshoppingapigw/configuration.json
Normal file
142
src/Apigw/configs/windows/webshoppingapigw/configuration.json
Normal file
@ -0,0 +1,142 @@
|
||||
{
|
||||
"ReRoutes": [
|
||||
{
|
||||
"DownstreamPathTemplate": "/api/{version}/{everything}",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "catalog.api",
|
||||
"Port": 80
|
||||
}
|
||||
],
|
||||
"UpstreamPathTemplate": "/shopping/api/{version}/c/{everything}",
|
||||
"UpstreamHttpMethod": [ "GET" ]
|
||||
},
|
||||
{
|
||||
"DownstreamPathTemplate": "/api/{version}/{everything}",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "basket.api",
|
||||
"Port": 80
|
||||
}
|
||||
],
|
||||
"UpstreamPathTemplate": "/shopping/api/{version}/b/{everything}",
|
||||
"UpstreamHttpMethod": [],
|
||||
"AuthenticationOptions": {
|
||||
"AuthenticationProviderKey": "IdentityApiKey",
|
||||
"AllowedScopes": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"DownstreamPathTemplate": "/api/{version}/{everything}",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "ordering.api",
|
||||
"Port": 80
|
||||
}
|
||||
],
|
||||
"UpstreamPathTemplate": "/shopping/api/{version}/o/{everything}",
|
||||
"UpstreamHttpMethod": [],
|
||||
"AuthenticationOptions": {
|
||||
"AuthenticationProviderKey": "IdentityApiKey",
|
||||
"AllowedScopes": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"DownstreamPathTemplate": "/{everything}",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "mobileshoppingagg",
|
||||
"Port": 80
|
||||
}
|
||||
],
|
||||
"UpstreamPathTemplate": "/shopping/{everything}",
|
||||
"UpstreamHttpMethod": [ "POST", "PUT", "GET" ],
|
||||
"AuthenticationOptions": {
|
||||
"AuthenticationProviderKey": "IdentityApiKey",
|
||||
"AllowedScopes": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"DownstreamPathTemplate": "/{everything}",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "ordering.api",
|
||||
"Port": 80
|
||||
}
|
||||
],
|
||||
"UpstreamPathTemplate": "/orders-api/{everything}",
|
||||
"UpstreamHttpMethod": []
|
||||
},
|
||||
{
|
||||
"DownstreamPathTemplate": "/{everything}",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "basket.api",
|
||||
"Port": 80
|
||||
}
|
||||
],
|
||||
"UpstreamPathTemplate": "/basket-api/{everything}",
|
||||
"UpstreamHttpMethod": []
|
||||
},
|
||||
{
|
||||
"DownstreamPathTemplate": "/{everything}",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "catalog.api",
|
||||
"Port": 80
|
||||
}
|
||||
],
|
||||
"UpstreamPathTemplate": "/catalog-api/{everything}",
|
||||
"UpstreamHttpMethod": []
|
||||
},
|
||||
{
|
||||
"DownstreamPathTemplate": "/{everything}",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "marketing.api",
|
||||
"Port": 80
|
||||
}
|
||||
],
|
||||
"UpstreamPathTemplate": "/marketing-api/{everything}",
|
||||
"UpstreamHttpMethod": []
|
||||
},
|
||||
{
|
||||
"DownstreamPathTemplate": "/{everything}",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "payment.api",
|
||||
"Port": 80
|
||||
}
|
||||
],
|
||||
"UpstreamPathTemplate": "/payment-api/{everything}",
|
||||
"UpstreamHttpMethod": []
|
||||
},
|
||||
{
|
||||
"DownstreamPathTemplate": "/{everything}",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "locations.api",
|
||||
"Port": 80
|
||||
}
|
||||
],
|
||||
"UpstreamPathTemplate": "/location-api/{everything}",
|
||||
"UpstreamHttpMethod": []
|
||||
}
|
||||
|
||||
],
|
||||
"GlobalConfiguration": {
|
||||
"RequestIdKey": "OcRequestId",
|
||||
"AdministrationPath": "/administration"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user