diff --git a/README.md b/README.md index 28b3cda9a..5bf7701ab 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,57 @@ # Containerized eShop Sample reference containerized application, cross-platform and microservices architecture. -Powered by .NET Core, Docker and Docker Swarm mode +Powered by Microsoft + + + +#Overview +In this repo you will fin samples that will help you to get introduced into .net core, microservices environment and docker. + + +#Tools +#### Windows +Docker tools for windows + +####Mac +Docker tools for Mac + +##Set up Cpu and Memory +In this demo we will run 3 instances of SQL Server, 6 asp.net core applications and 1 redis server it's important to set up properly the Cpu and Ram assigned to docker. This can be set, once installed docker in your device through the whale icon, right click, settings and in the Advanced option you will need to adjust the default to the new values shown in the image: + + + +#Demo +The demo scenario is based on a ecommerce shop, each service is a .net core web application (basket, catalog, ordering, identity) and this services are consumed by differents web and mobile applications. + +MVC Application: Its an Mvc 6 development where you can find good samples about how to work with microservices in a MVC asp.net core application. + +SPA Application: Developed with Angular2, Typescript and Mvc 6, is another different aproach in web on how to work in a Microservices oriented solution. + +Xamarin Application (Ios, Windows, Android): Its a client application that run in mobile devices (ios, android, windows) and you can find another example on how to build a microservices oriented application. + +#Deploy goblal +In the global directory you will find the scripts needed to run and deploy the demo into your local docker infraestructure. The steps: + + +- build-images.ps1 Build .net applications and docker images: This power shell script that you will find in the root directory of the solution is the responsible of building .net applications and package in a pub folder and use docker commands to build the images needed to run the previously packaged .net applications. + +- Compose containers in your docker local VM: Finally you have to open your favourite command tool pointing to the root directory of the solution where docker-compose.yml file is located and run the command `docker-compose up` + +#Run +Once the deploy process of docker-compose finishes you have to be able to access the services in this urls from your machine: +- Web: http://localhost:5100 +- Web Spa: http://localhost:5104 +- Catalog service: http://localhost:5101 +- Orders service: http://localhost:5102 +- Basket service: http://localhost:5103 +- Identity service: http://localhost:5105 +- Orders data (SQL Server): Server=tcp:localhost,5432;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word; +- Catalog data (SQL Server): Server=tcp:localhost,5434;Database=CatalogDB;User Id=sa;Password=Pass@word +- Identity data (SQL Server): Server=localhost,5433;Database=aspnet-Microsoft.eShopOnContainers;User Id=sa;Password=Pass@word +- Basket data (Redis): listening in localhost:6379 + +#Deploy individiual services into docker +Under each project root you will find a readme.md file as this that describes how to run and deploy the service individually into a docker container. + + + diff --git a/add-host-entry.ps1 b/add-host-entry.ps1 new file mode 100644 index 000000000..e373be888 --- /dev/null +++ b/add-host-entry.ps1 @@ -0,0 +1,19 @@ +param([switch]$Elevated) +function Check-Admin { +$currentUser = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent()) +$currentUser.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator) +} +if ((Check-Admin) -eq $false) { +if ($elevated) +{ +# could not elevate, quit +} + +else { + +Start-Process powershell.exe -Verb RunAs -ArgumentList ('-noprofile -noexit -file "{0}" -elevated' -f ($myinvocation.MyCommand.Definition)) +} +exit +} + +ac -Encoding UTF8 C:\Windows\system32\drivers\etc\hosts "127.0.0.1 identity.service" \ No newline at end of file diff --git a/build-image-service-basket.ps1 b/build-image-service-basket.ps1 new file mode 100644 index 000000000..8294f4625 --- /dev/null +++ b/build-image-service-basket.ps1 @@ -0,0 +1,16 @@ +$scriptPath = Split-Path $script:MyInvocation.MyCommand.Path + +Write-Host "Current script directory is $scriptPath" -ForegroundColor Yellow + +#*** Basket service image *** +$basketPathToJson = $scriptPath + "\src\Services\Basket\Basket.API\project.json" +Write-Host "basketPathToJson is $basketPathToJson" -ForegroundColor Yellow +$basketPathToPub = $scriptPath + "\pub\basket" +Write-Host "basketPathToPub is $basketPathToPub" -ForegroundColor Yellow + +Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue +dotnet restore $basketPathToJson +dotnet build $basketPathToJson +dotnet publish $basketPathToJson -o $basketPathToPub + +docker build -t eshop/basket.api $basketPathToPub \ No newline at end of file diff --git a/build-image-service-catalog.ps1 b/build-image-service-catalog.ps1 new file mode 100644 index 000000000..7612e4f59 --- /dev/null +++ b/build-image-service-catalog.ps1 @@ -0,0 +1,16 @@ +$scriptPath = Split-Path $script:MyInvocation.MyCommand.Path + +Write-Host "Current script directory is $scriptPath" -ForegroundColor Yellow + +#*** Catalog service image *** +$catalogPathToJson = $scriptPath + "\src\Services\Catalog\Catalog.API\project.json" +Write-Host "catalogPathToJson is $catalogPathToJson" -ForegroundColor Yellow +$catalogPathToPub = $scriptPath + "\pub\catalog" +Write-Host "catalogPathToPub is $catalogPathToPub" -ForegroundColor Yellow + +Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue +dotnet restore $catalogPathToJson +dotnet build $catalogPathToJson +dotnet publish $catalogPathToJson -o $catalogPathToPub + +docker build -t eshop/catalog.api $catalogPathToPub \ No newline at end of file diff --git a/build-image-service-identity.ps1 b/build-image-service-identity.ps1 new file mode 100644 index 000000000..00c8d0076 --- /dev/null +++ b/build-image-service-identity.ps1 @@ -0,0 +1,16 @@ +$scriptPath = Split-Path $script:MyInvocation.MyCommand.Path + +Write-Host "Current script directory is $scriptPath" -ForegroundColor Yellow + +# *** identitySvc image *** +$identitySvcPathToJson = $scriptPath + "\src\Services\Identity\eShopOnContainers.Identity\project.json" +Write-Host "identitySvcPathToJson is $identitySvcPathToJson" -ForegroundColor Yellow +$identitySvcPathToPub = $scriptPath + "\pub\identity" +Write-Host "identitySvcPathToPub is $identitySvcPathToPub" -ForegroundColor Yellow + +Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue +dotnet restore $identitySvcPathToJson +dotnet build $identitySvcPathToJson +dotnet publish $identitySvcPathToJson -o $identitySvcPathToPub + +docker build -t eshop/identity $identitySvcPathToPub \ No newline at end of file diff --git a/build-image-service-orders.ps1 b/build-image-service-orders.ps1 new file mode 100644 index 000000000..6212bd60e --- /dev/null +++ b/build-image-service-orders.ps1 @@ -0,0 +1,16 @@ +$scriptPath = Split-Path $script:MyInvocation.MyCommand.Path + +Write-Host "Current script directory is $scriptPath" -ForegroundColor Yellow + +#*** Ordering service image *** +$orderingPathToJson = $scriptPath + "\src\Services\Ordering\Ordering.API\project.json" +Write-Host "orderingPathToJson is $orderingPathToJson" -ForegroundColor Yellow +$orderingPathToPub = $scriptPath + "\pub\ordering" +Write-Host "orderingPathToPub is $orderingPathToPub" -ForegroundColor Yellow + +Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue +dotnet restore $orderingPathToJson +dotnet build $orderingPathToJson +dotnet publish $orderingPathToJson -o $orderingPathToPub + +docker build -t eshop/ordering.api $orderingPathToPub \ No newline at end of file diff --git a/build-image-web-spa.ps1 b/build-image-web-spa.ps1 new file mode 100644 index 000000000..e28757366 --- /dev/null +++ b/build-image-web-spa.ps1 @@ -0,0 +1,77 @@ +$scriptPath = Split-Path $script:MyInvocation.MyCommand.Path + +Write-Host "Current script directory is $scriptPath" -ForegroundColor Yellow + +$pubFolderToDelete = $scriptPath + "\pub" +remove-item -path $pubFolderToDelete -Force -Recurse -ErrorAction SilentlyContinue + +# *** WebSPA image *** +$webSPAPathToJson = $scriptPath + "\src\Web\WebSPA\eShopOnContainers.WebSPA\project.json" +Write-Host "webSPAPathToJson is $webSPAPathToJson" -ForegroundColor Yellow +$webSPAPathToPub = $scriptPath + "\pub\webSPA" +$webSPAPathToNpmBat = $scriptPath + "\src\Web\WebSPA\eShopOnContainers.WebSPA\buildspa.bat" +Write-Host "webSPAPathToPub is $webSPAPathToPub" -ForegroundColor Yellow + +Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue +dotnet restore $webSPAPathToJson +dotnet build $webSPAPathToJson +# Start-Process "cmd.exe" "/c " + $webSPAPathToNpmBat +dotnet publish $webSPAPathToJson -o $webSPAPathToPub + +# *** identitySvc image *** +$identitySvcPathToJson = $scriptPath + "\src\Services\Identity\eShopOnContainers.Identity\project.json" +Write-Host "identitySvcPathToJson is $identitySvcPathToJson" -ForegroundColor Yellow +$identitySvcPathToPub = $scriptPath + "\pub\identity" +Write-Host "identitySvcPathToPub is $identitySvcPathToPub" -ForegroundColor Yellow + +Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue +dotnet restore $identitySvcPathToJson +dotnet build $identitySvcPathToJson +dotnet publish $identitySvcPathToJson -o $identitySvcPathToPub + + +#*** Catalog service image *** +$catalogPathToJson = $scriptPath + "\src\Services\Catalog\Catalog.API\project.json" +Write-Host "catalogPathToJson is $catalogPathToJson" -ForegroundColor Yellow +$catalogPathToPub = $scriptPath + "\pub\catalog" +Write-Host "catalogPathToPub is $catalogPathToPub" -ForegroundColor Yellow + +Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue +dotnet restore $catalogPathToJson +dotnet build $catalogPathToJson +dotnet publish $catalogPathToJson -o $catalogPathToPub + +#*** Ordering service image *** +$orderingPathToJson = $scriptPath + "\src\Services\Ordering\Ordering.API\project.json" +Write-Host "orderingPathToJson is $orderingPathToJson" -ForegroundColor Yellow +$orderingPathToPub = $scriptPath + "\pub\ordering" +Write-Host "orderingPathToPub is $orderingPathToPub" -ForegroundColor Yellow + +Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue +dotnet restore $orderingPathToJson +dotnet build $orderingPathToJson +dotnet publish $orderingPathToJson -o $orderingPathToPub + +#*** Basket service image *** +$basketPathToJson = $scriptPath + "\src\Services\Basket\Basket.API\project.json" +Write-Host "basketPathToJson is $basketPathToJson" -ForegroundColor Yellow +$basketPathToPub = $scriptPath + "\pub\basket" +Write-Host "basketPathToPub is $basketPathToPub" -ForegroundColor Yellow + +Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue +dotnet restore $basketPathToJson +dotnet build $basketPathToJson +dotnet publish $basketPathToJson -o $basketPathToPub + +#!/bin/bash +# Delete all containers +docker rm $(docker ps -a -q) -f +# Delete all images +docker rmi $(docker images -q) + +#*** build docker images *** +docker build -t eshop/catalog.api $catalogPathToPub +docker build -t eshop/ordering.api $orderingPathToPub +docker build -t eshop/basket.api $basketPathToPub +docker build -t eshop/webspa $webSPAPathToPub +docker build -t eshop/identity $identitySvcPathToPub \ No newline at end of file diff --git a/build-image-web.ps1 b/build-image-web.ps1 new file mode 100644 index 000000000..1a2b06fdb --- /dev/null +++ b/build-image-web.ps1 @@ -0,0 +1,75 @@ +$scriptPath = Split-Path $script:MyInvocation.MyCommand.Path + +Write-Host "Current script directory is $scriptPath" -ForegroundColor Yellow + +$pubFolderToDelete = $scriptPath + "..\..\pub" +remove-item -path $pubFolderToDelete -Force -Recurse -ErrorAction SilentlyContinue +#cmd /c "rd /s pub" /q + +# *** WebMVC image *** +$webPathToJson = $scriptPath + "\src\Web\WebMVC\project.json" +Write-Host "webPathToJson is $webPathToJson" -ForegroundColor Yellow +$webPathToPub = $scriptPath + "\pub\webMVC" +Write-Host "webPathToPub is $webPathToPub" -ForegroundColor Yellow + +Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue +dotnet restore $webPathToJson +dotnet build $webPathToJson +dotnet publish $webPathToJson -o $webPathToPub + +# *** identitySvc image *** +$identitySvcPathToJson = $scriptPath + "\src\Services\Identity\eShopOnContainers.Identity\project.json" +Write-Host "identitySvcPathToJson is $identitySvcPathToJson" -ForegroundColor Yellow +$identitySvcPathToPub = $scriptPath + "\pub\identity" +Write-Host "identitySvcPathToPub is $identitySvcPathToPub" -ForegroundColor Yellow + +Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue +dotnet restore $identitySvcPathToJson +dotnet build $identitySvcPathToJson +dotnet publish $identitySvcPathToJson -o $identitySvcPathToPub + +#*** Catalog service image *** +$catalogPathToJson = $scriptPath + "\src\Services\Catalog\Catalog.API\project.json" +Write-Host "catalogPathToJson is $catalogPathToJson" -ForegroundColor Yellow +$catalogPathToPub = $scriptPath + "\pub\catalog" +Write-Host "catalogPathToPub is $catalogPathToPub" -ForegroundColor Yellow + +Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue +dotnet restore $catalogPathToJson +dotnet build $catalogPathToJson +dotnet publish $catalogPathToJson -o $catalogPathToPub + +#*** Ordering service image *** +$orderingPathToJson = $scriptPath + "\src\Services\Ordering\Ordering.API\project.json" +Write-Host "orderingPathToJson is $orderingPathToJson" -ForegroundColor Yellow +$orderingPathToPub = $scriptPath + "\pub\ordering" +Write-Host "orderingPathToPub is $orderingPathToPub" -ForegroundColor Yellow + +Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue +dotnet restore $orderingPathToJson +dotnet build $orderingPathToJson +dotnet publish $orderingPathToJson -o $orderingPathToPub + +#*** Basket service image *** +$basketPathToJson = $scriptPath + "\src\Services\Basket\Basket.API\project.json" +Write-Host "basketPathToJson is $basketPathToJson" -ForegroundColor Yellow +$basketPathToPub = $scriptPath + "\pub\basket" +Write-Host "basketPathToPub is $basketPathToPub" -ForegroundColor Yellow + +Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue +dotnet restore $basketPathToJson +dotnet build $basketPathToJson +dotnet publish $basketPathToJson -o $basketPathToPub + +#!/bin/bash +# Delete all containers +docker rm $(docker ps -a -q) -f +# Delete all images +docker rmi $(docker images -q) + +#*** build docker images *** +docker build -t eshop/web $webPathToPub +docker build -t eshop/catalog.api $catalogPathToPub +docker build -t eshop/ordering.api $orderingPathToPub +docker build -t eshop/basket.api $basketPathToPub +docker build -t eshop/identity $identitySvcPathToPub \ No newline at end of file diff --git a/build-images.ps1 b/build-images.ps1 index 2bdda0059..054e6b59d 100644 --- a/build-images.ps1 +++ b/build-images.ps1 @@ -1,11 +1,9 @@ - $scriptPath = Split-Path $script:MyInvocation.MyCommand.Path Write-Host "Current script directory is $scriptPath" -ForegroundColor Yellow $pubFolderToDelete = $scriptPath + "\pub" remove-item -path $pubFolderToDelete -Force -Recurse -ErrorAction SilentlyContinue -#cmd /c "rd /s pub" /q # *** WebMVC image *** $webPathToJson = $scriptPath + "\src\Web\WebMVC\project.json" @@ -18,17 +16,18 @@ dotnet restore $webPathToJson dotnet build $webPathToJson dotnet publish $webPathToJson -o $webPathToPub + # *** WebSPA image *** $webSPAPathToJson = $scriptPath + "\src\Web\WebSPA\eShopOnContainers.WebSPA\project.json" Write-Host "webSPAPathToJson is $webSPAPathToJson" -ForegroundColor Yellow $webSPAPathToPub = $scriptPath + "\pub\webSPA" -#$webSPAPathToNpmBat = $scriptPath + "\src\Web\WebSPA\eShopOnContainers.WebSPA\buildspa.bat" +$webSPAPathToNpmBat = $scriptPath + "\src\Web\WebSPA\eShopOnContainers.WebSPA\buildspa.bat" Write-Host "webSPAPathToPub is $webSPAPathToPub" -ForegroundColor Yellow Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue dotnet restore $webSPAPathToJson dotnet build $webSPAPathToJson -#Start-Process "cmd.exe" "/c " + $webSPAPathToNpmBat +# Start-Process "cmd.exe" "/c " + $webSPAPathToNpmBat dotnet publish $webSPAPathToJson -o $webSPAPathToPub # *** identitySvc image *** @@ -76,6 +75,12 @@ dotnet restore $basketPathToJson dotnet build $basketPathToJson dotnet publish $basketPathToJson -o $basketPathToPub +#!/bin/bash +# Delete all containers +docker rm $(docker ps -a -q) -f +# Delete all images +docker rmi $(docker images -q) + #*** build docker images *** docker build -t eshop/web $webPathToPub docker build -t eshop/catalog.api $catalogPathToPub diff --git a/docker-compose.yml b/docker-compose.yml index 43417ea65..725c9cfc8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,17 +2,18 @@ version: '2' services: webmvc: - image: eshop/web${TAG} + image: eshop/web build: context: . dockerfile: Dockerfile environment: - CatalogUrl=http://catalog.api - OrderingUrl=http://ordering.api - - IdentityUrl=http://identity.service + #- IdentityUrl=http://104.40.62.65:5105 #Remote: VM Needs to have public access at 5105. + - IdentityUrl=http://identity.service:5105 #Local: You need a entry in windows host file to run identity in local docker. - BasketUrl=http://basket.api ports: - - "5100:80" + - "5100:5100" depends_on: - identity.service - basket.api @@ -25,7 +26,8 @@ services: environment: - CatalogUrl=http://catalog.api - OrderingUrl=http://ordering.api - - IdentityUrl=http://identity.service + #- IdentityUrl=http://104.40.62.65:5105 #Remote: VM Needs to have public access at 5105. + - IdentityUrl=http://identity.service:5105 #Local: You need a entry in windows host file to run identity in local docker. - BasketUrl=http://basket.api ports: - "5104:80" @@ -33,12 +35,48 @@ services: - basket.api - identity.service + identity.service: + image: eshop/identity + environment: + - SpaClient=http://localhost:5104 + - ConnectionString=Server=identity.data;Database=aspnet-Microsoft.eShopOnContainers;User Id=sa;Password=Pass@word + #- MvcClient=http://104.40.62.65:5100 #Remote: VM Needs to have public access at 5105. + - MvcClient=http://localhost:5100 #Local: You need a entry in windows host file to run identity in local docker. + ports: + - "5105:5105" + depends_on: + - identity.data + + identity.data: + image: microsoft/mssql-server-linux + environment: + - SA_PASSWORD=Pass@word + - ACCEPT_EULA=Y + ports: + - "5433:1433" + + basket.api: + image: eshop/basket.api + environment: + - ConnectionString=basket.data + #- identityUrl=http://104.40.62.65:5105 #Remote: VM Needs to have public access at 5105. + - identityUrl=http://identity.service:5105 #Local: You need a entry in windows host file to run identity in local docker. + build: + context: . + dockerfile: Dockerfile + ports: + - "5103:5103" + depends_on: + - basket.data + - identity.service + + basket.data: + image: redis + catalog.api: image: eshop/catalog.api environment: - ConnectionString=Server=catalog.data;Database=CatalogDB;User Id=sa;Password=Pass@word - expose: - - "80" ports: - "5101:80" depends_on: @@ -58,8 +96,6 @@ services: - ConnectionString=Server=ordering.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word ports: - "5102:80" - extra_hosts: - - "CESARDLBOOKVHD:10.0.75.1" depends_on: - ordering.data @@ -70,39 +106,3 @@ services: - ACCEPT_EULA=Y ports: - "5432:1433" - - identity.service: - image: eshop/identity - environment: - - Spa:http://webspa - - ConnectionString=Server=identity.data;Database=aspnet-Microsoft.eShopOnContainers.WebMVC;User Id=sa;Password=Pass@word - expose: - - "80" - ports: - - "5105:80" - depends_on: - - identity.data - - identity.data: - image: microsoft/mssql-server-linux - environment: - - SA_PASSWORD=Pass@word - - ACCEPT_EULA=Y - ports: - - "5433:1433" - - basket.api: - image: eshop/basket.api - environment: - - ConnectionString=basket.data - build: - context: . - dockerfile: Dockerfile - ports: - - "5103:80" - depends_on: - - basket.data - - identity.service - - basket.data: - image: redis \ No newline at end of file diff --git a/img/docker_settings.png b/img/docker_settings.png new file mode 100644 index 000000000..d53286fbd Binary files /dev/null and b/img/docker_settings.png differ diff --git a/img/eshop_cover.png b/img/eshop_cover.png new file mode 100644 index 000000000..5e2f01b87 Binary files /dev/null and b/img/eshop_cover.png differ diff --git a/push-images-to-registry.ps1 b/push-images-to-registry.ps1 deleted file mode 100644 index d567cf8bb..000000000 --- a/push-images-to-registry.ps1 +++ /dev/null @@ -1,4 +0,0 @@ - -docker push eshop/web -docker push eshop/catalog.api -docker push eshop/ordering.api \ No newline at end of file diff --git a/src/Services/Basket/Basket.API/Program.cs b/src/Services/Basket/Basket.API/Program.cs index ed9866dc2..712aafef8 100644 --- a/src/Services/Basket/Basket.API/Program.cs +++ b/src/Services/Basket/Basket.API/Program.cs @@ -17,7 +17,6 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API .UseContentRoot(Directory.GetCurrentDirectory()) .UseIISIntegration() .UseStartup() - .UseUrls("http://localhost:5008") .Build(); host.Run(); diff --git a/src/Services/Basket/Basket.API/Project_Readme.html b/src/Services/Basket/Basket.API/Project_Readme.html deleted file mode 100644 index 1a0f5b51a..000000000 --- a/src/Services/Basket/Basket.API/Project_Readme.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - - Welcome to ASP.NET Core - - - - - - -
-
-

This application consists of:

-
    -
  • Sample pages using ASP.NET Core MVC
  • -
  • Bower for managing client-side libraries
  • -
  • Theming using Bootstrap
  • -
-
- - - - - -
- - - diff --git a/src/Services/Basket/Basket.API/README.md b/src/Services/Basket/Basket.API/README.md new file mode 100644 index 000000000..aa8a68c02 --- /dev/null +++ b/src/Services/Basket/Basket.API/README.md @@ -0,0 +1,24 @@ +# Containerized eShop - Basket Service +Sample reference containerized application, cross-platform and microservices architecture. +Powered by Microsoft + +#Overview +This sample runs a microservices oriented application and a .net core Mvc application that consumes this services. You can find more information about how to set up docker in your machine in the global directory solution. + +#Deploy +In the global directory you will find the scripts needed to run and deploy the demo into your local docker infraestructure. + +- build-image-services-basket.ps1 Build .net applications and docker images: This power shell script that you will find in the root directory of the solution is the responsible of building .net applications and package in a pub folder and use docker commands to build the images needed to run the previously packaged .net applications. + +- Compose containers in your docker local VM: Finally you have to open your favourite command tool pointing to the root directory of this project where docker-compose.yml file is located and run the command `docker-compose up` + +#Run +Once the deploy process of docker-compose finishes you have to be able to access the services in this urls: +- Basket service: http://localhost:5103 +- Identity service: http://localhost:5105 +- Basket data (Redis): listening in localhost:6379 +- Identity data (SQL Server): Server=localhost,5433;Database=aspnet-Microsoft.eShopOnContainers;User Id=sa;Password=Pass@word + + + + diff --git a/src/Services/Basket/Basket.API/Startup.cs b/src/Services/Basket/Basket.API/Startup.cs index 070e10b86..f558b2e12 100644 --- a/src/Services/Basket/Basket.API/Startup.cs +++ b/src/Services/Basket/Basket.API/Startup.cs @@ -68,9 +68,11 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API // Use frameworks app.UseCors("CorsPolicy"); + var identityUrl = Configuration.GetValue(typeof(string), "IdentityUrl"); + app.UseIdentityServerAuthentication(new IdentityServerAuthenticationOptions { - Authority = "http://localhost:5000", + Authority = identityUrl.ToString(), ScopeName = "basket", RequireHttpsMetadata = false }); diff --git a/src/Services/Basket/Basket.API/appsettings.json b/src/Services/Basket/Basket.API/appsettings.json index 4a7f5b126..413de6ab8 100644 --- a/src/Services/Basket/Basket.API/appsettings.json +++ b/src/Services/Basket/Basket.API/appsettings.json @@ -7,6 +7,6 @@ "Microsoft": "Information" } }, - "identityUrl": "http://localhost:5000", + "IdentityUrl": "http://localhost:5105", "ConnectionString": "127.0.0.1" } diff --git a/src/Services/Basket/Basket.API/docker-compose.dev.debug.yml b/src/Services/Basket/Basket.API/docker-compose.dev.debug.yml deleted file mode 100644 index b2d89a04d..000000000 --- a/src/Services/Basket/Basket.API/docker-compose.dev.debug.yml +++ /dev/null @@ -1,17 +0,0 @@ -version: '2' - -services: - basket.api: - build: - args: - source: obj/Docker/empty/ - labels: - - "com.microsoft.visualstudio.targetoperatingsystem=linux" - environment: - - ASPNETCORE_ENVIRONMENT=Development - - DOTNET_USE_POLLING_FILE_WATCHER=1 - volumes: - - .:/app - - ~/.nuget/packages:/root/.nuget/packages:ro - - ~/clrdbg:/clrdbg:ro - entrypoint: tail -f /dev/null diff --git a/src/Services/Basket/Basket.API/docker-compose.dev.release.yml b/src/Services/Basket/Basket.API/docker-compose.dev.release.yml deleted file mode 100644 index 259308345..000000000 --- a/src/Services/Basket/Basket.API/docker-compose.dev.release.yml +++ /dev/null @@ -1,9 +0,0 @@ -version: '2' - -services: - basket.api: - labels: - - "com.microsoft.visualstudio.targetoperatingsystem=linux" - volumes: - - ~/clrdbg:/clrdbg:ro - entrypoint: tail -f /dev/null diff --git a/src/Services/Basket/Basket.API/docker-compose.yml b/src/Services/Basket/Basket.API/docker-compose.yml index 208b8dc37..0935fc210 100644 --- a/src/Services/Basket/Basket.API/docker-compose.yml +++ b/src/Services/Basket/Basket.API/docker-compose.yml @@ -2,29 +2,35 @@ version: '2' services: basket.api: - image: user/basket.api${TAG} + image: eshop/basket.api environment: - ConnectionString=basket.data + #- identityUrl=http://104.40.62.65:5105 #Remote: VM Needs to have public access at 5105. + - identityUrl=http://identity.service:5105 #Local: You need a entry in windows host file to run identity in local docker. build: context: . dockerfile: Dockerfile ports: - - "32783:80" + - "5103:5103" depends_on: - basket.data + - identity.service basket.data: image: redis identity.service: image: eshop/identity - expose: - - "80" + environment: + - SpaClient=http://localhost:5104 + - ConnectionString=Server=identity.data;Database=aspnet-Microsoft.eShopOnContainers;User Id=sa;Password=Pass@word + #- MvcClient=http://104.40.62.65:5100 #Remote: VM Needs to have public access at 5105. + - MvcClient=http://localhost:5100 #Local: You need a entry in windows host file to run identity in local docker. ports: - - "5105:80" + - "5105:5105" depends_on: - identity.data - + identity.data: image: microsoft/mssql-server-linux environment: diff --git a/src/Services/Catalog/Catalog.API/Controllers/HomeController.cs b/src/Services/Catalog/Catalog.API/Controllers/HomeController.cs new file mode 100644 index 000000000..e6ade8cc5 --- /dev/null +++ b/src/Services/Catalog/Catalog.API/Controllers/HomeController.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; + +// For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860 + +namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers +{ + public class HomeController : Controller + { + // GET: // + public IActionResult Index() + { + return new RedirectResult("~/swagger/ui"); + } + } +} diff --git a/src/Services/Catalog/Catalog.API/Dockerfile b/src/Services/Catalog/Catalog.API/Dockerfile index 3e3ef42e8..8bbc926f9 100644 --- a/src/Services/Catalog/Catalog.API/Dockerfile +++ b/src/Services/Catalog/Catalog.API/Dockerfile @@ -1,5 +1,5 @@ -FROM microsoft/aspnetcore:latest +FROM microsoft/aspnetcore:1.0.1 WORKDIR /app EXPOSE 80 -ADD . /app +COPY . /app ENTRYPOINT dotnet Catalog.API.dll \ No newline at end of file diff --git a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs index 105ef79cf..28d484d2d 100644 --- a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs +++ b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs @@ -1,44 +1,60 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure { using EntityFrameworkCore; + using Extensions.Logging; using Microsoft.AspNetCore.Builder; + using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; public class CatalogContextSeed { - public static async Task SeedAsync(IApplicationBuilder applicationBuilder) + public static async Task SeedAsync(IApplicationBuilder applicationBuilder, ILoggerFactory loggerFactory, int? retry = 0) { - var context = (CatalogContext)applicationBuilder - .ApplicationServices.GetService(typeof(CatalogContext)); - - using (context) + int retryForAvaiability = retry.Value; + try { - context.Database.Migrate(); + var context = (CatalogContext)applicationBuilder + .ApplicationServices.GetService(typeof(CatalogContext)); - if (!context.CatalogBrands.Any()) - { - context.CatalogBrands.AddRange( - GetPreconfiguredCatalogBrands()); + //using (context) + //{ + context.Database.Migrate(); - await context.SaveChangesAsync(); - } + if (!context.CatalogBrands.Any()) + { + context.CatalogBrands.AddRange( + GetPreconfiguredCatalogBrands()); - if (!context.CatalogTypes.Any()) - { - context.CatalogTypes.AddRange( - GetPreconfiguredCatalogTypes()); + await context.SaveChangesAsync(); + } - await context.SaveChangesAsync(); - } + if (!context.CatalogTypes.Any()) + { + context.CatalogTypes.AddRange( + GetPreconfiguredCatalogTypes()); - if (!context.CatalogItems.Any()) - { - context.CatalogItems.AddRange( - GetPreconfiguredItems()); + await context.SaveChangesAsync(); + } + + if (!context.CatalogItems.Any()) + { + context.CatalogItems.AddRange( + GetPreconfiguredItems()); - await context.SaveChangesAsync(); + await context.SaveChangesAsync(); + } + //} + } + catch (Exception ex) + { + if (retryForAvaiability < 10) + { + retryForAvaiability++; + var log = loggerFactory.CreateLogger("catalog seed"); + log.LogError(ex.Message); + await SeedAsync(applicationBuilder, loggerFactory, retryForAvaiability); } } } diff --git a/src/Services/Catalog/Catalog.API/README.md b/src/Services/Catalog/Catalog.API/README.md new file mode 100644 index 000000000..5616bab52 --- /dev/null +++ b/src/Services/Catalog/Catalog.API/README.md @@ -0,0 +1,21 @@ +# Containerized eShop - Catalog Service +Sample reference containerized application, cross-platform and microservices architecture. +Powered by Microsoft + +#Overview +This sample runs a microservices oriented application and a .net core Mvc application that consumes this services. You can find more information about how to set up docker in your machine in the global directory solution. + +#Deploy +In the global directory you will find the scripts needed to run and deploy the demo into your local docker infraestructure. + +- build-image-services-catalog.ps1 Build .net applications and docker images: This power shell script that you will find in the root directory of the solution is the responsible of building .net applications and package in a pub folder and use docker commands to build the images needed to run the previously packaged .net applications. + +- Compose containers in your docker local VM: Finally you have to open your favourite command tool pointing to the root directory of this project where docker-compose.yml file is located and run the command `docker-compose up` + +#Run +Once the deploy process of docker-compose finishes you have to be able to access the services in this urls: +- Catalog service: http://localhost:5101 +- Catalog data (SQL Server): Server=tcp:localhost,5434;Database=CatalogDB;User Id=sa;Password=Pass@word + + + diff --git a/src/Services/Catalog/Catalog.API/Startup.cs b/src/Services/Catalog/Catalog.API/Startup.cs index 1507cf408..67218969a 100644 --- a/src/Services/Catalog/Catalog.API/Startup.cs +++ b/src/Services/Catalog/Catalog.API/Startup.cs @@ -8,6 +8,9 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; + using System; + using System.Threading; + using System.Threading.Tasks; public class Startup { @@ -45,7 +48,6 @@ }); // Add framework services. - services.AddSwaggerGen(); services.ConfigureSwaggerGen(options => { @@ -68,9 +70,7 @@ .AllowCredentials()); }); - services.AddMvc(mvcoptions => - { - }); + services.AddMvc(); } public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) @@ -85,18 +85,19 @@ loggerFactory.AddConsole(Configuration.GetSection("Logging")); loggerFactory.AddDebug(); - //Seed Data - - CatalogContextSeed.SeedAsync(app) - .Wait(); - // Use frameworks app.UseCors("CorsPolicy"); - app.UseMvc(); + app.UseMvcWithDefaultRoute(); app.UseSwagger() .UseSwaggerUi(); + + //Seed Data + CatalogContextSeed.SeedAsync(app, loggerFactory) + .Wait(); + + } } } diff --git a/src/Services/Identity/eShopOnContainers.Identity/Configuration/ClientCallBackUrls.cs b/src/Services/Identity/eShopOnContainers.Identity/Configuration/ClientCallBackUrls.cs deleted file mode 100644 index 10bd2e420..000000000 --- a/src/Services/Identity/eShopOnContainers.Identity/Configuration/ClientCallBackUrls.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace eShopOnContainers.Identity.Configuration -{ - public class ClientCallBackUrls - { - public string Spa { get; set; } - } -} diff --git a/src/Services/Identity/eShopOnContainers.Identity/Configuration/Config.cs b/src/Services/Identity/eShopOnContainers.Identity/Configuration/Config.cs index c7e5189e5..3d413dcc7 100644 --- a/src/Services/Identity/eShopOnContainers.Identity/Configuration/Config.cs +++ b/src/Services/Identity/eShopOnContainers.Identity/Configuration/Config.cs @@ -6,14 +6,6 @@ namespace eShopOnContainers.Identity.Configuration { public class Config { - private readonly IOptions _settings; - - public Config(IOptions settings) - { - _settings = settings; - - } - // scopes define the resources in your system public static IEnumerable GetScopes() { @@ -38,7 +30,7 @@ namespace eShopOnContainers.Identity.Configuration } // client want to access resources (aka scopes) - public static IEnumerable GetClients() + public static IEnumerable GetClients(Dictionary clientsUrl) { return new List { @@ -49,9 +41,9 @@ namespace eShopOnContainers.Identity.Configuration ClientName = "eShop SPA OpenId Client", AllowedGrantTypes = GrantTypes.Implicit, AllowAccessTokensViaBrowser = true, - RedirectUris = { "http://localhost:5003/callback.html" }, - PostLogoutRedirectUris = { "http://localhost:5003/index.html" }, - AllowedCorsOrigins = { "http://localhost:5003" }, + RedirectUris = { $"{clientsUrl["Spa"]}/callback.html" }, + PostLogoutRedirectUris = { $"{clientsUrl["Spa"]}/index.html" }, + AllowedCorsOrigins = { $"{clientsUrl["Spa"]}" }, AllowedScopes = { StandardScopes.OpenId.Name, @@ -66,9 +58,9 @@ namespace eShopOnContainers.Identity.Configuration ClientName = "eShop Xamarin OpenId Client", AllowedGrantTypes = GrantTypes.Implicit, AllowAccessTokensViaBrowser = true, - RedirectUris = { "http://localhost:5003/callback.html" }, - PostLogoutRedirectUris = { "http://localhost:5003/index.html" }, - AllowedCorsOrigins = { "http://localhost:5003" }, + RedirectUris = { "http://eshopxamarin/callback.html" }, + PostLogoutRedirectUris = { "http://eshopxamarin/callback.html/index.html" }, + AllowedCorsOrigins = { "http://eshopxamarin" }, AllowedScopes = { StandardScopes.OpenId.Name, @@ -85,17 +77,17 @@ namespace eShopOnContainers.Identity.Configuration { new Secret("secret".Sha256()) }, - ClientUri = "http://localhost:2114", + ClientUri = $"{clientsUrl["Mvc"]}", // public uri of the client AllowedGrantTypes = GrantTypes.HybridAndClientCredentials, RedirectUris = new List { - "http://localhost:2114/signin-oidc" + $"{clientsUrl["Mvc"]}/signin-oidc", + "http://104.40.62.65:5100/signin-oidc" }, PostLogoutRedirectUris = new List { - "http://localhost:2114/" + $"{clientsUrl["Mvc"]}/" }, - LogoutUri = "http://localhost:2114/signout-oidc", AllowedScopes = new List { StandardScopes.OpenId.Name, diff --git a/src/Services/Identity/eShopOnContainers.Identity/Controllers/AccountController.cs b/src/Services/Identity/eShopOnContainers.Identity/Controllers/AccountController.cs index 58f1cf52b..c441e5976 100644 --- a/src/Services/Identity/eShopOnContainers.Identity/Controllers/AccountController.cs +++ b/src/Services/Identity/eShopOnContainers.Identity/Controllers/AccountController.cs @@ -202,8 +202,9 @@ namespace IdentityServer4.Quickstart.UI.Controllers // hack: try/catch to handle social providers that throw await HttpContext.Authentication.SignOutAsync(idp, new AuthenticationProperties { RedirectUri = url }); } - catch(NotSupportedException) + catch(Exception ex) { + _logger.LogCritical(ex.Message); } } @@ -247,73 +248,6 @@ namespace IdentityServer4.Quickstart.UI.Controllers return new ChallengeResult(provider, props); } - /// - /// Post processing of external authentication - /// - [HttpGet] - public async Task ExternalLoginCallback(string returnUrl) - { - // read external identity from the temporary cookie - var info = await HttpContext.Authentication.GetAuthenticateInfoAsync(IdentityServerConstants.ExternalCookieAuthenticationScheme); - //var tempUser = info?.Principal; - //if (tempUser == null) - //{ - // throw new Exception("External authentication error"); - //} - - //// retrieve claims of the external user - //var claims = tempUser.Claims.ToList(); - - //// try to determine the unique id of the external user - the most common claim type for that are the sub claim and the NameIdentifier - //// depending on the external provider, some other claim type might be used - //var userIdClaim = claims.FirstOrDefault(x => x.Type == JwtClaimTypes.Subject); - //if (userIdClaim == null) - //{ - // userIdClaim = claims.FirstOrDefault(x => x.Type == ClaimTypes.NameIdentifier); - //} - //if (userIdClaim == null) - //{ - // throw new Exception("Unknown userid"); - //} - - //// remove the user id claim from the claims collection and move to the userId property - //// also set the name of the external authentication provider - //claims.Remove(userIdClaim); - //var provider = info.Properties.Items["scheme"]; - //var userId = userIdClaim.Value; - - //// check if the external user is already provisioned - //var user = _loginService.FindByExternalProvider(provider, userId); - //if (user == null) - //{ - // // this sample simply auto-provisions new external user - // // another common approach is to start a registrations workflow first - // user = _loginService.AutoProvisionUser(provider, userId, claims); - //} - - //var additionalClaims = new List(); - - //// if the external system sent a session id claim, copy it over - //var sid = claims.FirstOrDefault(x => x.Type == JwtClaimTypes.SessionId); - //if (sid != null) - //{ - // additionalClaims.Add(new Claim(JwtClaimTypes.SessionId, sid.Value)); - //} - - //// issue authentication cookie for user - //await HttpContext.Authentication.SignInAsync(user.Subject, user.Username, provider, additionalClaims.ToArray()); - - //// delete temporary cookie used during external authentication - //await HttpContext.Authentication.SignOutAsync(IdentityServerConstants.ExternalCookieAuthenticationScheme); - - //// validate return URL and redirect back to authorization endpoint - //if (_interaction.IsValidReturnUrl(returnUrl)) - //{ - // return Redirect(returnUrl); - //} - - return Redirect("~/"); - } // GET: /Account/Register [HttpGet] @@ -361,6 +295,10 @@ namespace IdentityServer4.Quickstart.UI.Controllers } } + if (returnUrl != null) { + return Redirect(returnUrl); + } + return RedirectToAction("index", "home"); } diff --git a/src/Services/Identity/eShopOnContainers.Identity/Dockerfile b/src/Services/Identity/eShopOnContainers.Identity/Dockerfile index 8e55d6c06..d08c2afad 100644 --- a/src/Services/Identity/eShopOnContainers.Identity/Dockerfile +++ b/src/Services/Identity/eShopOnContainers.Identity/Dockerfile @@ -2,6 +2,5 @@ FROM microsoft/aspnetcore:1.0.1 ENTRYPOINT ["dotnet", "eShopOnContainers.Identity.dll"] ARG source=. WORKDIR /app -ENV ASPNETCORE_URLS http://*:80 -EXPOSE 80 -COPY $source . \ No newline at end of file +ENV ASPNETCORE_URLS http://*:5105 +COPY $source . diff --git a/src/Services/Identity/eShopOnContainers.Identity/Program.cs b/src/Services/Identity/eShopOnContainers.Identity/Program.cs index 5bfe9805e..23d4b8060 100644 --- a/src/Services/Identity/eShopOnContainers.Identity/Program.cs +++ b/src/Services/Identity/eShopOnContainers.Identity/Program.cs @@ -13,9 +13,9 @@ namespace eShopOnContainers.Identity { var host = new WebHostBuilder() .UseKestrel() - //.UseUrls("http://localhost:5000") + .UseUrls("http://0.0.0.0:5105") .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() + //.UseIISIntegration() .UseStartup() .Build(); diff --git a/src/Services/Identity/eShopOnContainers.Identity/README.md b/src/Services/Identity/eShopOnContainers.Identity/README.md new file mode 100644 index 000000000..e8c915ad8 --- /dev/null +++ b/src/Services/Identity/eShopOnContainers.Identity/README.md @@ -0,0 +1,25 @@ +# Containerized eShop - Identity Service +Sample reference containerized application, cross-platform and microservices architecture. +Powered by Microsoft + +#Overview +This sample runs a microservices oriented application and a .net core Mvc application that consumes this services. You can find more information about how to set up docker in your machine in the global directory solution. + +#Considerations +This service is a identity provider implemented with identity server 4, to implement this scenario is needed a public authority so to complete this flow in our local docker infrastructure we have to add a entry in our host file (windows) or equivalent in other platforms: + +identity.service 127.0.0.1 + +In the root directory of this solution you'll find add-host.ps1 script that does this work for you (requires elevation permission). + +#Deploy +In the global directory you will find the scripts needed to run and deploy the demo into your local docker infraestructure. + +- build-image-services-identity.ps1 Build .net applications and docker images: This power shell script that you will find in the root directory of the solution is the responsible of building .net applications and package in a pub folder and use docker commands to build the images needed to run the previously packaged .net applications. + +- Compose containers in your docker local VM: Finally you have to open your favourite command tool pointing to the root directory of this project where docker-compose.yml file is located and run the command `docker-compose up` + +#Run +Once the deploy process of docker-compose finishes you have to be able to access the services in this urls: +- Identity service: http://localhost:5105 +- Identity data (SQL Server): Server=localhost,5433;Database=aspnet-Microsoft.eShopOnContainers;User Id=sa;Password=Pass@word diff --git a/src/Services/Identity/eShopOnContainers.Identity/Startup.cs b/src/Services/Identity/eShopOnContainers.Identity/Startup.cs index 6275d9cd8..7c38b74bd 100644 --- a/src/Services/Identity/eShopOnContainers.Identity/Startup.cs +++ b/src/Services/Identity/eShopOnContainers.Identity/Startup.cs @@ -14,6 +14,7 @@ using eShopOnContainers.Identity.Models; using eShopOnContainers.Identity.Services; using eShopOnContainers.Identity.Configuration; using IdentityServer4.Services; +using System.Threading; namespace eShopOnContainers.Identity { @@ -56,17 +57,18 @@ namespace eShopOnContainers.Identity services.AddTransient(); services.AddTransient, EFLoginService>(); + //callbacks urls from config: + Dictionary clientUrls = new Dictionary(); + clientUrls.Add("Mvc", Configuration.GetValue("MvcClient")); + clientUrls.Add("Spa", Configuration.GetValue("SpaClient")); + // Adds IdentityServer services.AddIdentityServer() .AddTemporarySigningCredential() .AddInMemoryScopes(Config.GetScopes()) - .AddInMemoryClients(Config.GetClients()) + .AddInMemoryClients(Config.GetClients(clientUrls)) .AddAspNetIdentity() .Services.AddTransient(); - - //Configuration Settings: - services.AddOptions(); - services.Configure(Configuration.GetSection("ClientCallBackUrls")); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. @@ -100,17 +102,29 @@ namespace eShopOnContainers.Identity template: "{controller=Home}/{action=Index}/{id?}"); }); + MigrateDb(app); + } + + int retries = 0; + + private void MigrateDb(IApplicationBuilder app) + { try { var context = (ApplicationDbContext)app - .ApplicationServices.GetService(typeof(ApplicationDbContext)); - + .ApplicationServices.GetService(typeof(ApplicationDbContext)); using (context) { context.Database.Migrate(); } + + } + catch (Exception) + { + retries++; + if (retries < 2) + MigrateDb(app); } - catch (Exception) { } } } } diff --git a/src/Services/Identity/eShopOnContainers.Identity/Views/Account/Login.cshtml b/src/Services/Identity/eShopOnContainers.Identity/Views/Account/Login.cshtml index aa327f5b2..e008f672c 100644 --- a/src/Services/Identity/eShopOnContainers.Identity/Views/Account/Login.cshtml +++ b/src/Services/Identity/eShopOnContainers.Identity/Views/Account/Login.cshtml @@ -9,7 +9,7 @@ }
diff --git a/src/Services/Identity/eShopOnContainers.Identity/Views/Account/Register.cshtml b/src/Services/Identity/eShopOnContainers.Identity/Views/Account/Register.cshtml index 9fb328361..24a2afbb1 100644 --- a/src/Services/Identity/eShopOnContainers.Identity/Views/Account/Register.cshtml +++ b/src/Services/Identity/eShopOnContainers.Identity/Views/Account/Register.cshtml @@ -6,7 +6,7 @@
diff --git a/src/Services/Identity/eShopOnContainers.Identity/Views/Account/_Login.cshtml b/src/Services/Identity/eShopOnContainers.Identity/Views/Account/_Login.cshtml deleted file mode 100644 index a07ddb99d..000000000 --- a/src/Services/Identity/eShopOnContainers.Identity/Views/Account/_Login.cshtml +++ /dev/null @@ -1,49 +0,0 @@ -@*@model eShopOnContainers.Identity.Models.AccountViewModels.LoginViewModel - -*@ \ No newline at end of file diff --git a/src/Services/Identity/eShopOnContainers.Identity/Views/Home/Index.cshtml b/src/Services/Identity/eShopOnContainers.Identity/Views/Home/Index.cshtml index 329ece8ae..bd2846075 100644 --- a/src/Services/Identity/eShopOnContainers.Identity/Views/Home/Index.cshtml +++ b/src/Services/Identity/eShopOnContainers.Identity/Views/Home/Index.cshtml @@ -1,4 +1,4 @@ -
+