From f9e670425a241453c406142fbecfc2c3a2639e6d Mon Sep 17 00:00:00 2001 From: Cesar De la Torre Date: Fri, 3 Mar 2017 17:33:12 -0800 Subject: [PATCH] Cleaning up the docker-compose.override.yml by getting rid of commented URLs for a production enviroment --- cli-linux/build-bits-linux.sh | 39 ++++++++++++++++++++++++++++++++++ docker-compose.local.build.yml | 9 ++++++++ docker-compose.override.yml | 8 +------ 3 files changed, 49 insertions(+), 7 deletions(-) create mode 100644 cli-linux/build-bits-linux.sh create mode 100644 docker-compose.local.build.yml diff --git a/cli-linux/build-bits-linux.sh b/cli-linux/build-bits-linux.sh new file mode 100644 index 000000000..27f120214 --- /dev/null +++ b/cli-linux/build-bits-linux.sh @@ -0,0 +1,39 @@ + +projectList=( + "/src/Services/Catalog/Catalog.API" + "/src/Services/Basket/Basket.API" + "/src/Services/Ordering/Ordering.API" + "/src/Services/Identity/Identity.API" + "/src/Web/WebMVC" + "/src/Web/WebSPA" +) + +# Build SPA app +pushd $(pwd)/src/Web/WebSPA +npm rebuild node-sass +npm run build:prod + +for project in "${projectList[@]}" +do + echo -e "\e[33mWorking on $(pwd)/$project" + echo -e "\e[33m\tRemoving old publish output" + pushd $(pwd)/$project + rm -rf obj/Docker/publish + echo -e "\e[33m\tRestoring project" + dotnet restore + echo -e "\e[33m\tBuilding and publishing projects" + dotnet publish -o obj/Docker/publish + popd +done + +# remove old docker images: +#images=$(docker images --filter=reference="eshop/*" -q) +#if [ -n "$images" ]; then +# docker rm $(docker ps -a -q) -f +# echo "Deleting eShop images in local Docker repo" +# echo $images +# docker rmi $(docker images --filter=reference="eshop/*" -q) -f +#fi + +# No need to build the images, docker build or docker compose will +# do that using the images and containers defined in the docker-compose.yml file. \ No newline at end of file diff --git a/docker-compose.local.build.yml b/docker-compose.local.build.yml new file mode 100644 index 000000000..539eca913 --- /dev/null +++ b/docker-compose.local.build.yml @@ -0,0 +1,9 @@ +version: '2' + +services: + ci-build: + image: microsoft/aspnetcore-build-nightly:1.0-1.1 + volumes: + - .:/src + working_dir: /src + command: /bin/bash -c "chmod -x ./cli-linux/build-bits-linux.sh && ./cli-linux/build-bits-linux.sh" diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 909cf4172..19a24f76e 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -6,7 +6,6 @@ services: 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://identity.api:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. ports: - "5103:5103" @@ -15,7 +14,6 @@ services: environment: - 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://localhost:5101 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. ports: - "5101:5101" @@ -24,8 +22,7 @@ services: 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. + - ConnectionStrings__DefaultConnection=Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word - MvcClient=http://localhost:5100 #Local: You need to open your local dev-machine firewall at range 5100-5105. ports: - "5105:5105" @@ -34,7 +31,6 @@ services: environment: - 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://identity.api:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. ports: - "5102:5102" @@ -44,7 +40,6 @@ services: - ASPNETCORE_ENVIRONMENT=Development - 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://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: @@ -55,7 +50,6 @@ services: - ASPNETCORE_ENVIRONMENT=Development - 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://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://basket.api:5103 ports: