diff --git a/build-images.ps1 b/build-images.ps1 index 0324fbc05..9ddd22d09 100644 --- a/build-images.ps1 +++ b/build-images.ps1 @@ -7,17 +7,19 @@ $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 +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 + # *** WebSPA image *** $webSPAPathToJson = $scriptPath + "\src\Web\WebSPA\eShopOnContainers.WebSPA\project.json" Write-Host "webSPAPathToJson is $webSPAPathToJson" -ForegroundColor Yellow @@ -41,6 +43,7 @@ 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 @@ -52,6 +55,7 @@ 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 @@ -63,6 +67,8 @@ dotnet restore $basketPathToJson dotnet build $basketPathToJson dotnet publish $basketPathToJson -o $basketPathToPub + +#*** Build Docker Images docker build -t eshop/web $webPathToPub docker build -t eshop/catalog.api $catalogPathToPub docker build -t eshop/ordering.api $orderingPathToPub diff --git a/src/Services/Catalog/Catalog.API/Dockerfile b/src/Services/Catalog/Catalog.API/Dockerfile index 3e3ef42e8..155747d66 100644 --- a/src/Services/Catalog/Catalog.API/Dockerfile +++ b/src/Services/Catalog/Catalog.API/Dockerfile @@ -1,4 +1,4 @@ -FROM microsoft/aspnetcore:latest +FROM microsoft/aspnetcore:1.0.1 WORKDIR /app EXPOSE 80 ADD . /app diff --git a/src/Services/Catalog/Catalog.API/Startup.cs b/src/Services/Catalog/Catalog.API/Startup.cs index 1507cf408..0272a849e 100644 --- a/src/Services/Catalog/Catalog.API/Startup.cs +++ b/src/Services/Catalog/Catalog.API/Startup.cs @@ -52,9 +52,9 @@ options.DescribeAllEnumsAsStrings(); options.SingleApiVersion(new Swashbuckle.Swagger.Model.Info() { - Title = "Catalog HTTP API", + Title = "eShopOnContainers - Catalog HTTP API", Version = "v1", - Description = "The Catalog Service HTTP API", + Description = "The Catalog Microservice HTTP API. This is a Data-Driven/CRUD microservice sample", TermsOfService = "Terms Of Service" }); }); diff --git a/src/Services/Catalog/Catalog.API/docker-compose.yml b/src/Services/Catalog/Catalog.API/docker-compose.yml index 2a8432ccc..d08b67180 100644 --- a/src/Services/Catalog/Catalog.API/docker-compose.yml +++ b/src/Services/Catalog/Catalog.API/docker-compose.yml @@ -2,10 +2,7 @@ version: '2' services: catalog.api: - image: eshop/catalog.api - build: - context: . - dockerfile: Dockerfile + image: eshop/catalog.api environment: - ConnectionString=Server=catalog.data;Initial Catalog=CatalogData;User Id=sa;Password=Pass@word expose: