Skip to content

Commit e4e14cb

Browse files
committed
Merge from dev
2 parents ce1234f + 331bffa commit e4e14cb

56 files changed

Lines changed: 694 additions & 103 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,17 @@
77
ESHOP_EXTERNAL_DNS_NAME_OR_IP=localhost
88
ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP=10.121.122.92
99

10-
#ESHOP_AZURE_REDIS_BASKET_DB=
11-
#ESHOP_AZURE_STORAGE_CATALOG=
12-
#ESHOP_AZURE_STORAGE_MARKETING=
13-
#ESHOP_AZURE_SERVICE_BUS=
14-
#ESHOP_AZURE_COSMOSDB=
15-
#ESHOP_AZURE_CATALOG_DB=
16-
#ESHOP_AZURE_IDENTITY_DB=
17-
#ESHOP_AZURE_ORDERING_DB=
18-
#ESHOP_AZURE_MARKETING_DB=
19-
#ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI=
20-
#ESHOP_AZURE_STORAGE_CATALOG_NAME=
21-
#ESHOP_AZURE_STORAGE_CATALOG_KEY=
22-
#ESHOP_AZURE_STORAGE_MARKETING_NAME=
23-
#ESHOP_AZURE_STORAGE_MARKETING_KEY=
24-
10+
#ESHOP_AZURE_REDIS_BASKET_DB=<YourAzureRedisBasketInfo>
11+
#ESHOP_AZURE_STORAGE_CATALOG=<YourAzureStorageCatalog>
12+
#ESHOP_AZURE_STORAGE_MARKETING=<YourAzureStorageMarketing>
13+
#ESHOP_AZURE_SERVICE_BUS=<YourAzureServiceBusInfo>
14+
#ESHOP_AZURE_COSMOSDB=<YourAzureCosmosDBConnData>
15+
#ESHOP_AZURE_CATALOG_DB=<YourAzureSQLDBCatalogDBConnString>
16+
#ESHOP_AZURE_IDENTITY_DB=<YourAzureSQLDBIdentityDBConnString>
17+
#ESHOP_AZURE_ORDERING_DB=<YourAzureSQLDBOrderingDBConnString>
18+
#ESHOP_AZURE_MARKETING_DB=<YourAzureSQLDBMarketingDBConnString>
19+
#ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI=<YourAzureFunctionCampaignDetailsURI>
20+
#ESHOP_AZURE_STORAGE_CATALOG_NAME=<YourAzureStorageCatalogName>
21+
#ESHOP_AZURE_STORAGE_CATALOG_KEY=<YourAzureStorageCatalogKey>
22+
#ESHOP_AZURE_STORAGE_MARKETING_NAME=<YourAzureStorageMarketingName>
23+
#ESHOP_AZURE_STORAGE_MARKETING_KEY=<YourAzureStorageMarketingKey>

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
Sample .NET Core reference application, powered by Microsoft, based on a simplified microservices architecture and Docker containers. <p>
33
**Note for Pull Requests**: We accept pull request from the community. When doing it, please do it onto the DEV branch which is the consolidated work-in-progress branch. Do not request it onto Master, if possible.
44

5+
>**PLEASE** Read our [branch guide](./branch-guide.md) to know about our branching policy
6+
57
> ### DISCLAIMER
68
> **IMPORTANT:** The current state of this sample application is **BETA**, consider it version a 0.1 foundational version, therefore, many areas could be improved and change significantly while refactoring current code and implementing new features. **Feedback with improvements and pull requests from the community will be highly appreciated and accepted.**
79
>
@@ -41,7 +43,7 @@ You can download them and start reviewing these Guides/eBooks here:
4143
| Architecting & Developing | Containers Lifecycle & CI/CD | App patterns with Xamarin.Forms |
4244
| ------------ | ------------| ------------|
4345
| <a href='https://aka.ms/microservicesebook'><img src="img/ebook_arch_dev_microservices_containers_cover.png"> </a> | <a href='https://aka.ms/dockerlifecycleebook'> <img src="img/ebook_containers_lifecycle.png"> </a> | <a href='https://aka.ms/xamarinpatternsebook'> <img src="img/xamarin-enterprise-patterns-ebook-cover-small.png"> </a> |
44-
| <sup> <a href='https://aka.ms/microservicesebook'>**Download** (First Edition)</a> </sup> | <sup> <a href='https://aka.ms/dockerlifecycleebook'>**Download** (First Edition from late 2016) </a> </sup> | <sup> <a href='https://aka.ms/xamarinpatternsebook'>**Download** (First Edition) </a> </sup> |
46+
| <sup> <a href='https://aka.ms/microservicesebook'>**Download** (First Edition)</a> </sup> | <sup> <a href='https://aka.ms/dockerlifecycleebook'>**Download** (First Edition) </a> </sup> | <sup> <a href='https://aka.ms/xamarinpatternsebook'>**Download** (First Edition) </a> </sup> |
4547

4648
Send feedback to [dotnet-architecture-ebooks-feedback@service.microsoft.com](dotnet-architecture-ebooks-feedback@service.microsoft.com)
4749
<p>

branch-guide.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# eShopOnContainers - BRANCH GUIDE
2+
3+
Following are the most important branches:
4+
5+
- `dev`: Contains the latest code **and it is the branch actively developed**. Note that **all PRs must be against `dev` branch to be considered**.
6+
- `master`: Synced time to time from dev. It contains "stable" code, although not the latest one. We plan to do periodic merges from `dev` to `master`, but we are not doing it right now.
7+
- `netcore2`: Contains NETCore 2.0 (preview2) based code. All APIs and webs are migrated to netcore2 except `Identity.API` which still uses netcore1.1 (because of Identity Server). Dockerfiles are updated also. Use this branch to test the NETCore 2.0 code. You can also submit PR to this branch if they are related to netcore2.
8+
9+
Any other branch is considered temporary and could be deleted at any time. Do not do any PR to them!
10+
11+
Thanks!

cli-linux/build-bits-linux.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,4 @@ done
5050

5151
# No need to build the images, docker build or docker compose will
5252
# do that using the images and containers defined in the docker-compose.yml file.
53+
#

cli-linux/docker-compose.local.build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ services:
77
- .:/src
88
working_dir: /src
99
command: /bin/bash -c "chmod -x ./cli-linux/build-bits-linux.sh && ./cli-linux/build-bits-linux.sh"
10+

cli-linux/prepare-spa-app.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
21
# Build SPA app
32
pushd $(pwd)/src/Web/WebSPA
43
npm rebuild node-sass
54
#npm run build:prod
6-
7-

cli-linux/run.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ docker rm $(docker ps -a -q)
44
docker images |grep -v REPOSITORY|awk '{print $1}'|xargs -L1 docker pull
55
export ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP=$(curl ipinfo.io/ip)
66
docker-compose -f docker-compose.images.yml -f docker-compose.prod.yml up -d --force-recreate
7-

cli-windows/add-firewall-rules-for-sts-auth-thru-docker.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ try {
2121
Write-Host "Rule found"
2222
}
2323
catch [Exception] {
24-
New-NetFirewallRule -DisplayName eShopOnContainers-Inbound -Confirm -Description "eShopOnContainers Inbound Rule for port range 5100-5105" -LocalAddress Any -LocalPort 5100-5110 -Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Inbound
25-
New-NetFirewallRule -DisplayName eShopOnContainers-Outbound -Confirm -Description "eShopOnContainers Outbound Rule for port range 5100-5105" -LocalAddress Any -LocalPort 5100-5110 -Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Outbound
24+
New-NetFirewallRule -DisplayName eShopOnContainers-Inbound -Confirm -Description "eShopOnContainers Inbound Rule for port range 5100-5110" -LocalAddress Any -LocalPort 5100-5110 -Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Inbound
25+
New-NetFirewallRule -DisplayName eShopOnContainers-Outbound -Confirm -Description "eShopOnContainers Outbound Rule for port range 5100-5110" -LocalAddress Any -LocalPort 5100-5110 -Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Outbound
2626
}

deploy/az/azurefunctions/azurefunctionsdeploy.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"SitesEshopfunctionsName": "[parameters('SitesEshopfunctionsName')]",
1515
"WebConfigName": "[concat(variables('SitesEshopfunctionsName'), '/web')]",
1616
"Location": "[resourceGroup().location]",
17-
"EshopAccountsDatabase": "[concat(variables('SitesEshopfunctionsName'), 'db')]",
1817
"ServerFarmPlan": "[concat(trim(variables('location')), 'Plan')]",
1918
"StorageAccounts": "[concat(variables('SitesEshopfunctionsName'), 'st')]"
2019
},

docker-compose-windows.override.yml

Lines changed: 82 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,25 @@ services:
1212
environment:
1313
- ASPNETCORE_ENVIRONMENT=Development
1414
- ASPNETCORE_URLS=http://0.0.0.0:80
15-
- ConnectionString=basket.data
16-
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
17-
- EventBusConnection=rabbitmq
15+
- ConnectionString=${ESHOP_AZURE_REDIS_BASKET_DB:-basket.data}
16+
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
17+
- IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105
18+
- EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
19+
- AzureServiceBusEnabled=False
1820
ports:
1921
- "5103:80"
2022

2123
catalog.api:
2224
environment:
2325
- ASPNETCORE_ENVIRONMENT=Development
2426
- ASPNETCORE_URLS=http://0.0.0.0:80
25-
- ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word
26-
- ExternalCatalogBaseUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5101 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
27-
- EventBusConnection=rabbitmq
27+
- ConnectionString=${ESHOP_AZURE_CATALOG_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word}
28+
- PicBaseUrl=${ESHOP_AZURE_STORAGE_CATALOG:-http://localhost:5101/api/v1/catalog/items/[0]/pic/} #Local: You need to open your local dev-machine firewall at range 5100-5110.
29+
- EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
30+
- AzureStorageAccountName=${ESHOP_AZURE_STORAGE_CATALOG_NAME}
31+
- AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_CATALOG_KEY}
32+
- UseCustomizationData=True
33+
- AzureServiceBusEnabled=False
2834
ports:
2935
- "5101:80"
3036

@@ -33,18 +39,27 @@ services:
3339
- ASPNETCORE_ENVIRONMENT=Development
3440
- ASPNETCORE_URLS=http://0.0.0.0:80
3541
- SpaClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5104
36-
- ConnectionStrings__DefaultConnection=Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word
37-
- MvcClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5100 #Local: You need to open your local dev-machine firewall at range 5100-5105.
42+
- XamarinCallback=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105/xamarincallback #localhost do not work for UWP login, so we have to use "external" IP always
43+
- ConnectionStrings__DefaultConnection=${ESHOP_AZURE_IDENTITY_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word}
44+
- MvcClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5100 #Local: You need to open your local dev-machine firewall at range 5100-5110.
45+
- LocationApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5109
46+
- MarketingApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5110
47+
- BasketApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5103
48+
- OrderingApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5102
49+
- UseCustomizationData=True
3850
ports:
3951
- "5105:80"
4052

4153
ordering.api:
4254
environment:
4355
- ASPNETCORE_ENVIRONMENT=Development
4456
- ASPNETCORE_URLS=http://0.0.0.0:80
45-
- ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word
46-
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
47-
- EventBusConnection=rabbitmq
57+
- ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word}
58+
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
59+
- IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105
60+
- EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
61+
- UseCustomizationData=True
62+
- AzureServiceBusEnabled=False
4863
ports:
4964
- "5102:80"
5065

@@ -55,11 +70,14 @@ services:
5570
- CatalogUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5101
5671
- OrderingUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5102
5772
- IdentityUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
58-
- BasketUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5103
73+
- BasketUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5103
74+
- MarketingUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5110
5975
- CatalogUrlHC=http://catalog.api/hc
6076
- OrderingUrlHC=http://ordering.api/hc
6177
- IdentityUrlHC=http://identity.api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser.
62-
- BasketUrlHC=http://basket.api/hc
78+
- BasketUrlHC=http://basket.api/hc
79+
- MarketingUrlHC=http://marketing.api/hc
80+
- UseCustomizationData=True
6381
ports:
6482
- "5104:80"
6583

@@ -70,8 +88,9 @@ services:
7088
- CatalogUrl=http://catalog.api
7189
- OrderingUrl=http://ordering.api
7290
- BasketUrl=http://basket.api
73-
- IdentityUrl=http://10.0.75.1:5105 #Local: Use 10.0.75.1 in a "Docker for Windows" environment, if using "localhost" from browser.
74-
#Remote: Use ${ESHOP_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser.
91+
- IdentityUrl=http://10.0.75.1:5105
92+
- MarketingUrl=http://marketing.api #Local: Use 10.0.75.1 in a "Docker for Windows" environment, if using "localhost" from browser.
93+
- UseCustomizationData=True #Remote: Use ${ESHOP_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser.
7594
ports:
7695
- "5100:80"
7796

@@ -90,21 +109,61 @@ services:
90109
environment:
91110
- ASPNETCORE_ENVIRONMENT=Development
92111
- ASPNETCORE_URLS=http://0.0.0.0:80
93-
- ConnectionString=mongodb://nosql.data
112+
- ConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data}
94113
- Database=LocationsDb
95-
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
96-
- EventBusConnection=rabbitmq
114+
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
115+
- IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105
116+
- EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
117+
- AzureServiceBusEnabled=False
97118
ports:
98119
- "5109:80"
99120

100121
marketing.api:
101122
environment:
102123
- ASPNETCORE_ENVIRONMENT=Development
103124
- ASPNETCORE_URLS=http://0.0.0.0:80
104-
- ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word
105-
- EventBusConnection=rabbitmq
106-
- MongoConnectionString=mongodb://nosql.data
125+
- ConnectionString=${ESHOP_AZURE_MARKETING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word}
126+
- MongoConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data}
107127
- MongoDatabase=MarketingDb
108-
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
128+
- EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
129+
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
130+
- IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105
131+
- CampaignDetailFunctionUri=${ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI}
132+
- PicBaseUrl=${ESHOP_AZURE_STORAGE_MARKETING:-http://localhost:5110/api/v1/campaigns/[0]/pic/}
133+
- AzureStorageAccountName=${ESHOP_AZURE_STORAGE_MARKETING_NAME}
134+
- AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_MARKETING_KEY}
135+
- AzureServiceBusEnabled=False
136+
ports:
137+
- "5110:80"
138+
139+
graceperiodmanager:
140+
environment:
141+
- ASPNETCORE_ENVIRONMENT=Development
142+
- ASPNETCORE_URLS=http://0.0.0.0:80
143+
- ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word
144+
- EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
145+
- AzureServiceBusEnabled=False
146+
147+
webstatus:
148+
environment:
149+
- ASPNETCORE_ENVIRONMENT=Development
150+
- ASPNETCORE_URLS=http://0.0.0.0:80
151+
- CatalogUrl=http://catalog.api/hc
152+
- OrderingUrl=http://ordering.api/hc
153+
- BasketUrl=http://basket.api/hc
154+
- IdentityUrl=http://identity.api/hc
155+
- LocationsUrl=http://locations.api/hc
156+
- MarketingUrl=http://marketing.api/hc
157+
- mvc=http://webmvc/hc
158+
- spa=http://webspa/hc
159+
ports:
160+
- "5107:80"
161+
162+
payment.api:
163+
environment:
164+
- ASPNETCORE_ENVIRONMENT=Development
165+
- ASPNETCORE_URLS=http://0.0.0.0:80
166+
- EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
167+
- AzureServiceBusEnabled=False
109168
ports:
110-
- "5110:80"
169+
- "5108:80"

0 commit comments

Comments
 (0)