Browse Source

Merge pull request #8 from abpframework/gterdem/k8

Dockerize and image build scripts
gterdem/deployment_k8s
Enis Necipoglu 5 years ago
committed by GitHub
parent
commit
a7b7e2be84
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      apps/angular/Dockerfile
  2. 4
      apps/auth-server/src/EShopOnAbp.AuthServer/Dockerfile
  3. 4
      apps/public-web/src/EShopOnAbp.PublicWeb/Dockerfile
  4. 74
      etc/scripts/build-images.ps1
  5. 4
      gateways/internal/src/EShopOnAbp.InternalGateway/Dockerfile
  6. 4
      gateways/web-public/src/EShopOnAbp.WebPublicGateway/Dockerfile
  7. 4
      gateways/web/src/EShopOnAbp.WebGateway/Dockerfile
  8. 4
      services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/Dockerfile
  9. 4
      services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/Dockerfile
  10. 4
      services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/Dockerfile

3
apps/angular/Dockerfile

@ -0,0 +1,3 @@
FROM nginx:alpine
WORKDIR /app
COPY dist/EShopOnAbp /usr/share/nginx/html

4
apps/auth-server/src/EShopOnAbp.AuthServer/Dockerfile

@ -0,0 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0
COPY bin/Release/net6.0/publish/ app/
WORKDIR /app
ENTRYPOINT ["dotnet", "EShopOnAbp.AuthServer.dll"]

4
apps/public-web/src/EShopOnAbp.PublicWeb/Dockerfile

@ -0,0 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0
COPY bin/Release/net6.0/publish/ app/
WORKDIR /app
ENTRYPOINT ["dotnet", "EShopOnAbp.PublicWeb.dll"]

74
etc/scripts/build-images.ps1

@ -0,0 +1,74 @@
param ($version='latest')
$currentFolder = $PSScriptRoot
$slnFolder = Join-Path $currentFolder "../../"
$webAppFolder = Join-Path $slnFolder "apps/angular"
$authserverFolder = Join-Path $slnFolder "apps/auth-server/src/EShopOnAbp.AuthServer"
$publicWebFolder = Join-Path $slnFolder "apps/public-web/src/EShopOnAbp.PublicWeb"
$webGatewayFolder = Join-Path $slnFolder "gateways/web/src/EShopOnAbp.WebGateway"
$publicWebGatewayFolder = Join-Path $slnFolder "gateways/web-public/src/EShopOnAbp.WebPublicGateway"
$internalGatewayFolder = Join-Path $slnFolder "gateways/internal/src/EShopOnAbp.InternalGateway"
$identityServiceFolder = Join-Path $slnFolder "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host"
$administrationServiceFolder = Join-Path $slnFolder "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host"
$saasServiceFolder = Join-Path $slnFolder "services/saas/src/EShopOnAbp.SaasService.HttpApi.Host"
### Angular WEB App(WWW)
Write-Host "*** BUILDING WEB (WWW) ****************" -ForegroundColor Green
Set-Location $webAppFolder
yarn
ng build --prod
docker build -t eshoponabp/app-web:$version .
### AUTH-SERVER
Write-Host "*** BUILDING AUTH-SERVER ****************" -ForegroundColor Green
Set-Location $authserverFolder
dotnet publish -c Release
docker build -t eshoponabp/app-authserver:$version .
### PUBLIC-WEB
Write-Host "*** BUILDING PUBLIC-WEB ****************" -ForegroundColor Green
Set-Location $publicWebFolder
dotnet publish -c Release
docker build -t eshoponabp/app-publicweb:$version .
### WEB-GATEWAY
Write-Host "*** BUILDING WEB-GATEWAY ****************" -ForegroundColor Green
Set-Location $webGatewayFolder
dotnet publish -c Release
docker build -t eshoponabp/gateway-web:$version .
### PUBLICWEB-GATEWAY
Write-Host "*** BUILDING PUBLICWEB-GATEWAY ****************" -ForegroundColor Green
Set-Location $publicWebGatewayFolder
dotnet publish -c Release
docker build -t eshoponabp/gateway-publicweb:$version .
### INTERNAL-GATEWAY
Write-Host "*** BUILDING INTERNAL-GATEWAY ****************" -ForegroundColor Green
Set-Location $internalGatewayFolder
dotnet publish -c Release
docker build -t eshoponabp/gateway-internal:$version .
### IDENTITY-SERVICE
Write-Host "*** BUILDING IDENTITY-SERVICE ****************" -ForegroundColor Green
Set-Location $identityServiceFolder
dotnet publish -c Release
docker build -t eshoponabp/service-identity:$version .
### ADMINISTRATION-SERVICE
Write-Host "*** BUILDING ADMINISTRATION-SERVICE ****************" -ForegroundColor Green
Set-Location $administrationServiceFolder
dotnet publish -c Release
docker build -t eshoponabp/service-administration:$version .
### SAAS-SERVICE
Write-Host "*** BUILDING SAAS-SERVICE ****************" -ForegroundColor Green
Set-Location $saasServiceFolder
dotnet publish -c Release
docker build -t eshoponabp/service-saas:$version .
### ALL COMPLETED
Write-Host "ALL COMPLETED" -ForegroundColor Green
Set-Location $currentFolder

4
gateways/internal/src/EShopOnAbp.InternalGateway/Dockerfile

@ -0,0 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0
COPY bin/Release/net6.0/publish/ app/
WORKDIR /app
ENTRYPOINT ["dotnet", "EShopOnAbp.InternalGateway.dll"]

4
gateways/web-public/src/EShopOnAbp.WebPublicGateway/Dockerfile

@ -0,0 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0
COPY bin/Release/net6.0/publish/ app/
WORKDIR /app
ENTRYPOINT ["dotnet", "EShopOnAbp.WebPublicGateway.dll"]

4
gateways/web/src/EShopOnAbp.WebGateway/Dockerfile

@ -0,0 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0
COPY bin/Release/net6.0/publish/ app/
WORKDIR /app
ENTRYPOINT ["dotnet", "EShopOnAbp.WebGateway.dll"]

4
services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/Dockerfile

@ -0,0 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0
COPY bin/Release/net6.0/publish/ app/
WORKDIR /app
ENTRYPOINT ["dotnet", "EShopOnAbp.AdministrationService.HttpApi.Host.dll"]

4
services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/Dockerfile

@ -0,0 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0
COPY bin/Release/net6.0/publish/ app/
WORKDIR /app
ENTRYPOINT ["dotnet", "EShopOnAbp.IdentityService.HttpApi.Host.dll"]

4
services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/Dockerfile

@ -0,0 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0
COPY bin/Release/net6.0/publish/ app/
WORKDIR /app
ENTRYPOINT ["dotnet", "EShopOnAbp.SaasService.HttpApi.Host.dll"]
Loading…
Cancel
Save