Browse Source

updated build scripts

pull/78/head
Galip Tolga Erdem 5 years ago
parent
commit
410f15e233
  1. 35
      build/build-images-locally.ps1
  2. 32
      build/build-images.ps1

35
build/build-images-locally.ps1

@ -11,9 +11,12 @@ $webPublicGatewayFolder = Join-Path $slnFolder "gateways/web-public/src/EShopOnA
$identityServiceFolder = Join-Path $slnFolder "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host" $identityServiceFolder = Join-Path $slnFolder "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host"
$administrationServiceFolder = Join-Path $slnFolder "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host" $administrationServiceFolder = Join-Path $slnFolder "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host"
$catalogServiceFolder = Join-Path $slnFolder "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host"
$paymentServiceFolder = Join-Path $slnFolder "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host"
$orderingServiceFolder = Join-Path $slnFolder "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host"
### Angular WEB App(WWW) ### Angular WEB App(WWW)
Write-Host "*** BUILDING WEB (WWW) 1/7 ****************" -ForegroundColor Green Write-Host "*** BUILDING WEB (WWW) 1/10 ****************" -ForegroundColor Green
Set-Location $webAppFolder Set-Location $webAppFolder
yarn yarn
# ng build --prod # ng build --prod
@ -21,41 +24,59 @@ npm run build:prod
docker build -f Dockerfile.local -t eshoponabp/app-web:$version . docker build -f Dockerfile.local -t eshoponabp/app-web:$version .
### AUTH-SERVER ### AUTH-SERVER
Write-Host "*** BUILDING AUTH-SERVER 2/7 ****************" -ForegroundColor Green Write-Host "*** BUILDING AUTH-SERVER 2/10 ****************" -ForegroundColor Green
Set-Location $authserverFolder Set-Location $authserverFolder
dotnet publish -c Release dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/app-authserver:$version . docker build -f Dockerfile.local -t eshoponabp/app-authserver:$version .
### PUBLIC-WEB ### PUBLIC-WEB
Write-Host "*** BUILDING WEB-PUBLIC 3/7 ****************" -ForegroundColor Green Write-Host "*** BUILDING WEB-PUBLIC 3/10 ****************" -ForegroundColor Green
Set-Location $publicWebFolder Set-Location $publicWebFolder
dotnet publish -c Release dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/app-publicweb:$version . docker build -f Dockerfile.local -t eshoponabp/app-publicweb:$version .
### WEB-GATEWAY ### WEB-GATEWAY
Write-Host "*** BUILDING WEB-GATEWAY 4/7 ****************" -ForegroundColor Green Write-Host "*** BUILDING WEB-GATEWAY 4/10 ****************" -ForegroundColor Green
Set-Location $webGatewayFolder Set-Location $webGatewayFolder
dotnet publish -c Release dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/gateway-web:$version . docker build -f Dockerfile.local -t eshoponabp/gateway-web:$version .
### PUBLICWEB-GATEWAY ### PUBLICWEB-GATEWAY
Write-Host "*** BUILDING WEB-PUBLIC-GATEWAY 5/7 ****************" -ForegroundColor Green Write-Host "*** BUILDING WEB-PUBLIC-GATEWAY 5/10 ****************" -ForegroundColor Green
Set-Location $webPublicGatewayFolder Set-Location $webPublicGatewayFolder
dotnet publish -c Release dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/gateway-web-public:$version . docker build -f Dockerfile.local -t eshoponabp/gateway-web-public:$version .
### IDENTITY-SERVICE ### IDENTITY-SERVICE
Write-Host "*** BUILDING IDENTITY-SERVICE 6/7 ****************" -ForegroundColor Green Write-Host "*** BUILDING IDENTITY-SERVICE 6/10 ****************" -ForegroundColor Green
Set-Location $identityServiceFolder Set-Location $identityServiceFolder
dotnet publish -c Release dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/service-identity:$version . docker build -f Dockerfile.local -t eshoponabp/service-identity:$version .
### ADMINISTRATION-SERVICE ### ADMINISTRATION-SERVICE
Write-Host "*** BUILDING ADMINISTRATION-SERVICE 7/7 ****************" -ForegroundColor Green Write-Host "*** BUILDING ADMINISTRATION-SERVICE 7/10 ****************" -ForegroundColor Green
Set-Location $administrationServiceFolder Set-Location $administrationServiceFolder
dotnet publish -c Release dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/service-administration:$version . docker build -f Dockerfile.local -t eshoponabp/service-administration:$version .
### CATALOG-SERVICE
Write-Host "**************** BUILDING CATALOG-SERVICE 8/10 ****************" -ForegroundColor Green
Set-Location $catalogServiceFolder
dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/service-catalog:$version .
### PAYMENT-SERVICE
Write-Host "**************** BUILDING PAYMENT-SERVICE 9/10 ****************" -ForegroundColor Green
Set-Location $paymentServiceFolder
dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/service-payment:$version .
### ORDERING-SERVICE
Write-Host "**************** BUILDING ORDERING-SERVICE 10/10 ****************" -ForegroundColor Green
Set-Location $orderingServiceFolder
dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/service-ordering:$version .
### ALL COMPLETED ### ALL COMPLETED
Write-Host "ALL COMPLETED" -ForegroundColor Green Write-Host "ALL COMPLETED" -ForegroundColor Green
Set-Location $currentFolder Set-Location $currentFolder

32
build/build-images.ps1

@ -11,48 +11,66 @@ $webPublicGatewayFolder = Join-Path $slnFolder "gateways/web-public/src/EShopOnA
$identityServiceFolder = Join-Path $slnFolder "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host" $identityServiceFolder = Join-Path $slnFolder "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host"
$administrationServiceFolder = Join-Path $slnFolder "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host" $administrationServiceFolder = Join-Path $slnFolder "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host"
$catalogServiceFolder = Join-Path $slnFolder "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host"
$paymentServiceFolder = Join-Path $slnFolder "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host"
$orderingServiceFolder = Join-Path $slnFolder "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host"
Write-Host "===== BUILDING APPLICATIONS =====" -ForegroundColor Yellow Write-Host "===== BUILDING APPLICATIONS =====" -ForegroundColor Yellow
### Angular WEB App ### Angular WEB App
Write-Host "*** BUILDING ANGULAR WEB APPLICATION 1/7 ***" -ForegroundColor Green Write-Host "*** BUILDING ANGULAR WEB APPLICATION 1/10 ***" -ForegroundColor Green
Set-Location $webAppFolder Set-Location $webAppFolder
docker build -f "$webAppFolder/Dockerfile" -t eshoponabp/app-web:$version . docker build -f "$webAppFolder/Dockerfile" -t eshoponabp/app-web:$version .
### AUTH-SERVER ### AUTH-SERVER
Write-Host "**************** BUILDING AUTH-SERVER 2/7 ****************" -ForegroundColor Green Write-Host "**************** BUILDING AUTH-SERVER 2/10 ****************" -ForegroundColor Green
Set-Location $slnFolder Set-Location $slnFolder
docker build -f "$authserverFolder/Dockerfile" -t eshoponabp/app-authserver:$version . docker build -f "$authserverFolder/Dockerfile" -t eshoponabp/app-authserver:$version .
### PUBLIC-WEB ### PUBLIC-WEB
Write-Host "**************** BUILDING WEB-PUBLIC 3/7 ****************" -ForegroundColor Green Write-Host "**************** BUILDING WEB-PUBLIC 3/10 ****************" -ForegroundColor Green
Set-Location $slnFolder Set-Location $slnFolder
docker build -f "$publicWebFolder/Dockerfile" -t eshoponabp/app-publicweb:$version . docker build -f "$publicWebFolder/Dockerfile" -t eshoponabp/app-publicweb:$version .
Write-Host "===== BUILDING GATEWAYS =====" -ForegroundColor Yellow Write-Host "===== BUILDING GATEWAYS =====" -ForegroundColor Yellow
### WEB-GATEWAY ### WEB-GATEWAY
Write-Host "**************** BUILDING WEB-GATEWAY 4/7 ****************" -ForegroundColor Green Write-Host "**************** BUILDING WEB-GATEWAY 4/10 ****************" -ForegroundColor Green
Set-Location $slnFolder Set-Location $slnFolder
docker build -f "$webGatewayFolder/Dockerfile" -t eshoponabp/gateway-web:$version . docker build -f "$webGatewayFolder/Dockerfile" -t eshoponabp/gateway-web:$version .
### PUBLICWEB-GATEWAY ### PUBLICWEB-GATEWAY
Write-Host "**************** BUILDING WEB-PUBLIC-GATEWAY 5/7 ****************" -ForegroundColor Green Write-Host "**************** BUILDING WEB-PUBLIC-GATEWAY 5/10 ****************" -ForegroundColor Green
Set-Location $slnFolder Set-Location $slnFolder
docker build -f "$webPublicGatewayFolder/Dockerfile" -t eshoponabp/gateway-web-public:$version . docker build -f "$webPublicGatewayFolder/Dockerfile" -t eshoponabp/gateway-web-public:$version .
Write-Host "===== BUILDING MICROSERVICES =====" -ForegroundColor Yellow Write-Host "===== BUILDING MICROSERVICES =====" -ForegroundColor Yellow
### IDENTITY-SERVICE ### IDENTITY-SERVICE
Write-Host "**************** BUILDING IDENTITY-SERVICE 6/7 ****************" -ForegroundColor Green Write-Host "**************** BUILDING IDENTITY-SERVICE 6/10 ****************" -ForegroundColor Green
Set-Location $slnFolder Set-Location $slnFolder
docker build -f "$identityServiceFolder/Dockerfile" -t eshoponabp/service-identity:$version . docker build -f "$identityServiceFolder/Dockerfile" -t eshoponabp/service-identity:$version .
### ADMINISTRATION-SERVICE ### ADMINISTRATION-SERVICE
Write-Host "**************** BUILDING ADMINISTRATION-SERVICE 7/7 ****************" -ForegroundColor Green Write-Host "**************** BUILDING ADMINISTRATION-SERVICE 7/10 ****************" -ForegroundColor Green
Set-Location $slnFolder Set-Location $slnFolder
docker build -f "$administrationServiceFolder/Dockerfile" -t eshoponabp/service-administration:$version . docker build -f "$administrationServiceFolder/Dockerfile" -t eshoponabp/service-administration:$version .
### CATALOG-SERVICE
Write-Host "**************** BUILDING CATALOG-SERVICE 8/10 ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$catalogServiceFolder/Dockerfile" -t eshoponabp/service-catalog:$version .
### PAYMENT-SERVICE
Write-Host "**************** BUILDING PAYMENT-SERVICE 9/10 ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$paymentServiceFolder/Dockerfile" -t eshoponabp/service-payment:$version .
### ORDERING-SERVICE
Write-Host "**************** BUILDING ORDERING-SERVICE 10/10 ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$orderingServiceFolder/Dockerfile" -t eshoponabp/service-ordering:$version .
### ALL COMPLETED ### ALL COMPLETED
Write-Host "ALL COMPLETED" -ForegroundColor Green Write-Host "ALL COMPLETED" -ForegroundColor Green
Set-Location $currentFolder Set-Location $currentFolder
Loading…
Cancel
Save