Skip to content

Commit 3b2c80e

Browse files
committed
Ocelot config via volumes
1 parent 6cc87fc commit 3b2c80e

12 files changed

Lines changed: 225 additions & 2 deletions

File tree

.gitattributes

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,15 @@
6969
###############################################################################
7070
*.pfx binary
7171

72+
################################################################################
73+
# Ocelot config files are shared via volumes, so its EOL are important
74+
################################################################################
75+
/src/Apigw/configs/linux/mobilemarketingapigw/configuration.json text eol=lf
76+
/src/Apigw/configs/linux/mobileshoppingapigw/configuration.json text eol=lf
77+
/src/Apigw/configs/linux/webmarketingapigw/configuration.json text eol=lf
78+
/src/Apigw/configs/linux/webshoppingapigw/configuration.json text eol=lf
79+
80+
/src/Apigw/configs/windows/mobilemarketingapigw/configuration.json text eol=crlf
81+
/src/Apigw/configs/windows/mobileshoppingapigw/configuration.json text eol=crlf
82+
/src/Apigw/configs/windows/webmarketingapigw/configuration.json text eol=crlf
83+
/src/Apigw/configs/windows/webshoppingapigw/configuration.json text eol=crlf

docker-compose.override.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,42 @@ services:
218218
- "15672:15672"
219219
- "5672:5672"
220220

221-
apigw:
221+
mobileshoppingapigw:
222222
environment:
223223
- ASPNETCORE_ENVIRONMENT=Development
224224
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
225225
ports:
226226
- "5200:80"
227+
volumes:
228+
- ./src/Apigw/configs/mobileshoppingapigw:/app/configuration
229+
230+
mobilemarketingapigw:
231+
environment:
232+
- ASPNETCORE_ENVIRONMENT=Development
233+
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
234+
ports:
235+
- "5201:80"
236+
volumes:
237+
- ./src/Apigw/configs/mobilemarketingapigw:/app/configuration
238+
239+
webshoppingapigw:
240+
environment:
241+
- ASPNETCORE_ENVIRONMENT=Development
242+
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
243+
ports:
244+
- "5202:80"
245+
volumes:
246+
- ./src/Apigw/configs/webshoppingapigw:/app/configuration
247+
248+
249+
webmarketingapigw:
250+
environment:
251+
- ASPNETCORE_ENVIRONMENT=Development
252+
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
253+
ports:
254+
- "5203:80"
255+
volumes:
256+
- ./src/Apigw/configs/webmarketingapigw:/app/configuration
227257

228258
mobileshoppingagg:
229259
environment:

docker-compose.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,25 @@ services:
108108
rabbitmq:
109109
image: rabbitmq:3-management-alpine
110110

111-
apigw:
111+
mobileshoppingapigw:
112+
image: eshop/ocelotapigw
113+
build:
114+
context: .
115+
dockerfile: src/Apigw/OcelotApiGw/Dockerfile
116+
117+
mobilemarketingapigw:
118+
image: eshop/ocelotapigw
119+
build:
120+
context: .
121+
dockerfile: src/Apigw/OcelotApiGw/Dockerfile
122+
123+
webshoppingapigw:
124+
image: eshop/ocelotapigw
125+
build:
126+
context: .
127+
dockerfile: src/Apigw/OcelotApiGw/Dockerfile
128+
129+
webmarketingapigw:
112130
image: eshop/ocelotapigw
113131
build:
114132
context: .

eShopOnContainers-ServicesAndWebApps.sln

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,18 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Aggregators", "Aggregators"
105105
EndProject
106106
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mobile.Shopping.HttpAggregator", "src\Aggregators\Mobile.Shopping.HttpAggregator\Mobile.Shopping.HttpAggregator.csproj", "{6E99F232-1536-424F-A28C-91692C8FD325}"
107107
EndProject
108+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "configs", "configs", "{D8D24753-8421-40EE-8FE5-B8BE06A07AC5}"
109+
EndProject
110+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MobileBff.Shopping.ApiGw", "MobileBff.Shopping.ApiGw", "{DAEA3807-1578-4B43-9033-E400FAF1DC49}"
111+
ProjectSection(SolutionItems) = preProject
112+
src\Apigw\configs\mobileshoppingapigw\configuration.json = src\Apigw\configs\mobileshoppingapigw\configuration.json
113+
EndProjectSection
114+
EndProject
115+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MobileBff.Marketing.ApiGw", "MobileBff.Marketing.ApiGw", "{AC3EDABD-8EB0-4045-BC12-39865490A79D}"
116+
ProjectSection(SolutionItems) = preProject
117+
src\Apigw\configs\mobilemarketingapigw\configuration.json = src\Apigw\configs\mobilemarketingapigw\configuration.json
118+
EndProjectSection
119+
EndProject
108120
Global
109121
GlobalSection(SolutionConfigurationPlatforms) = preSolution
110122
Ad-Hoc|Any CPU = Ad-Hoc|Any CPU
@@ -1465,6 +1477,9 @@ Global
14651477
{E0C5162E-DF26-4341-9E51-14AE800D7505} = {7A58AA20-67F3-48F3-88C8-24EBFE621792}
14661478
{EA378316-9D49-4A6B-858E-D4A25F948A74} = {932D8224-11F6-4D07-B109-DA28AD288A63}
14671479
{6E99F232-1536-424F-A28C-91692C8FD325} = {EA378316-9D49-4A6B-858E-D4A25F948A74}
1480+
{D8D24753-8421-40EE-8FE5-B8BE06A07AC5} = {7A58AA20-67F3-48F3-88C8-24EBFE621792}
1481+
{DAEA3807-1578-4B43-9033-E400FAF1DC49} = {D8D24753-8421-40EE-8FE5-B8BE06A07AC5}
1482+
{AC3EDABD-8EB0-4045-BC12-39865490A79D} = {D8D24753-8421-40EE-8FE5-B8BE06A07AC5}
14681483
EndGlobalSection
14691484
GlobalSection(ExtensibilityGlobals) = postSolution
14701485
SolutionGuid = {25728519-5F0F-4973-8A64-0A81EB4EA8D9}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

src/Apigw/OcelotApiGw/configuration/configuration.json renamed to src/Apigw/configs/linux/webshoppingapigw/configuration.json

File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

0 commit comments

Comments
 (0)