From 4e2583477b51bdd4f0808535ad9f87d6422fe7ed Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Wed, 15 Feb 2017 23:10:56 -0500 Subject: [PATCH] script working for SPA --- build-images.sh | 11 +++++++++-- docker-compose.override.yml | 29 +++++++++++++++++++---------- 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/build-images.sh b/build-images.sh index 9f4cc354c..2b778fe23 100755 --- a/build-images.sh +++ b/build-images.sh @@ -5,12 +5,19 @@ dotnet publish "$(pwd)/src/Web/WebMVC/project.json" -o "$(pwd)/pub/webMVC" dotnet publish "$(pwd)/src/Services/Catalog/Catalog.API/project.json" -o "$(pwd)/pub/catalog" dotnet publish "$(pwd)/src/Services/Ordering/Ordering.API/project.json" -o "$(pwd)/pub/ordering" dotnet publish "$(pwd)/src/Services/Basket/Basket.API/project.json" -o "$(pwd)/pub/basket" + +pushd "$(pwd)/src/Web/WebSPA/eShopOnContainers.WebSPA" +npm install +npm run build:prod +popd + +dotnet publish "$(pwd)/src/Web/WebSPA/eShopOnContainers.WebSPA/project.json" -o "$(pwd)/pub/webSPA" + dotnet publish "$(pwd)/src/Services/Identity/Identity.API/project.json" -o "$(pwd)/pub/identity" -dotnet publish "$(pwd)/src/Web/WebSPA/eShopOnContainers.WebSPA/project.json" -o "$(pwd)/pub/WebSPA" docker build -t eshop/web "$(pwd)/pub/webMVC" docker build -t eshop/catalog.api "$(pwd)/pub/catalog" docker build -t eshop/ordering.api "$(pwd)/pub/ordering" docker build -t eshop/basket.api "$(pwd)/pub/basket" +docker build -t eshop/webspa "$(pwd)/pub/webSPA" docker build -t eshop/identity "$(pwd)/pub/identity" -docker build -t eshop/webspa "$(pwd)/pub/WebSPA" diff --git a/docker-compose.override.yml b/docker-compose.override.yml index c07f0081d..ea5e70064 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -1,12 +1,23 @@ version: '2' services: + + webmvc: + environment: + - CatalogUrl=http://catalog.api:5101 + - OrderingUrl=http://ordering.api:5102 + #- IdentityUrl=http://13.88.8.119:5105 #Remote: VM Needs to have public access at 5105. + - IdentityUrl=http://identity.service:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. + - BasketUrl=http://basket.api:5103 + ports: + - "5100:5100" + basket.api: environment: - ASPNETCORE_ENVIRONMENT=Development - ConnectionString=basket.data #- identityUrl=http://13.88.8.119:5105 #Remote: VM Needs to have public access at 5105. - - identityUrl=http://10.0.75.1:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. + - identityUrl=http://identity.service:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. ports: - "5103:5103" @@ -15,18 +26,17 @@ services: - ASPNETCORE_ENVIRONMENT=Development - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word #- ExternalCatalogBaseUrl=http://13.88.8.119:5101 #Remote: VM Needs to have public access at 5105. - - ExternalCatalogBaseUrl=http://10.0.75.1:5101 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. + - ExternalCatalogBaseUrl=http://localhost:5101 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. ports: - "5101:5101" - identity.api: environment: - ASPNETCORE_ENVIRONMENT=Development - SpaClient=http://localhost:5104 - ConnectionStrings__DefaultConnection=Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word #- MvcClient=http://13.88.8.119:5100 #Remote: VM Needs to have public access at 5105. - - MvcClient=http://10.0.75.1:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. + - MvcClient=http://localhost:5100 #Local: You need to open your local dev-machine firewall at range 5100-5105. ports: - "5105:5105" @@ -35,18 +45,17 @@ services: - ASPNETCORE_ENVIRONMENT=Development - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word #- identityUrl=http://13.88.8.119:5105 #Remote: VM Needs to have public access at 5105. - - identityUrl=http://10.0.75.1:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. + - identityUrl=http://identity.service:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. ports: - "5102:5102" eshoponcontainers.webspa: environment: - - ASPNETCORE_ENVIRONMENT=Development - - CatalogUrl=http://10.0.75.1:5101 - - OrderingUrl=http://10.0.75.1:5102 + - CatalogUrl=http://localhost:5101 + - OrderingUrl=http://localhost:5102 #- IdentityUrl=http://13.88.8.119:5105 #Remote: VM Needs to have public access at 5105. - - IdentityUrl=http://10.0.75.1:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. - - BasketUrl=http://10.0.75.1:5103 + - IdentityUrl=http://localhost:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. + - BasketUrl=http://localhost:5103 ports: - "5104:5104"