Browse Source

Cleaning up the docker-compose.override.yml by getting rid of commented URLs for a production enviroment

pull/78/head
Cesar De la Torre 8 years ago
parent
commit
f9e670425a
3 changed files with 49 additions and 7 deletions
  1. +39
    -0
      cli-linux/build-bits-linux.sh
  2. +9
    -0
      docker-compose.local.build.yml
  3. +1
    -7
      docker-compose.override.yml

+ 39
- 0
cli-linux/build-bits-linux.sh View File

@ -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.

+ 9
- 0
docker-compose.local.build.yml View File

@ -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"

+ 1
- 7
docker-compose.override.yml View File

@ -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:


Loading…
Cancel
Save