Browse Source

updated angular multistage docker image and script

ipaddr
Galip Tolga Erdem 5 years ago
parent
commit
1fcc2a7734
  1. 15
      apps/angular/Dockerfile
  2. 68
      build/build-images.ps1

15
apps/angular/Dockerfile

@ -0,0 +1,15 @@
FROM node:14-alpine as build
WORKDIR /app
COPY package*.json /app/
RUN npm install
COPY . /app
ARG configuration=production
RUN npm run ng build -- --output-path=dist/EShopOnAbp --configuration $configuration
FROM nginx:alpine
COPY dynamic-env.json /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist/EShopOnAbp/ /usr/share/nginx/html

68
build/build-images.ps1

@ -15,49 +15,49 @@ $saasServiceFolder = Join-Path $slnFolder "services/saas/src/EShopOnAbp.SaasServ
Write-Host "===== BUILDING APPLICATIONS =====" -ForegroundColor Yellow
# ### Angular WEB App
# Write-Host "*** BUILDING ANGULAR WEB APPLICATION ***" -ForegroundColor Green
# Set-Location $slnFolder
# docker build -f "$webAppFolder/Dockerfile" -t eshoponabp/app-web:$version .
### Angular WEB App
Write-Host "*** BUILDING ANGULAR WEB APPLICATION ***" -ForegroundColor Green
Set-Location $webAppFolder
docker build -f "$webAppFolder/Dockerfile" -t eshoponabp/app-web:$version .
### AUTH-SERVER
Write-Host "**************** BUILDING AUTH-SERVER ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$authserverFolder/Dockerfile" -t eshoponabp/app-authserver:$version .
# ### AUTH-SERVER
# Write-Host "**************** BUILDING AUTH-SERVER ****************" -ForegroundColor Green
# Set-Location $slnFolder
# docker build -f "$authserverFolder/Dockerfile" -t eshoponabp/app-authserver:$version .
### PUBLIC-WEB
Write-Host "**************** BUILDING WEB-PUBLIC ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$publicWebFolder/Dockerfile" -t eshoponabp/app-publicweb:$version .
# ### PUBLIC-WEB
# Write-Host "**************** BUILDING WEB-PUBLIC ****************" -ForegroundColor Green
# Set-Location $slnFolder
# docker build -f "$publicWebFolder/Dockerfile" -t eshoponabp/app-publicweb:$version .
Write-Host "===== BUILDING GATEWAYS =====" -ForegroundColor Yellow
# Write-Host "===== BUILDING GATEWAYS =====" -ForegroundColor Yellow
### WEB-GATEWAY
Write-Host "**************** BUILDING WEB-GATEWAY ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$webGatewayFolder/Dockerfile" -t eshoponabp/gateway-web:$version .
# ### WEB-GATEWAY
# Write-Host "**************** BUILDING WEB-GATEWAY ****************" -ForegroundColor Green
# Set-Location $slnFolder
# docker build -f "$webGatewayFolder/Dockerfile" -t eshoponabp/gateway-web:$version .
### PUBLICWEB-GATEWAY
Write-Host "**************** BUILDING WEB-PUBLIC-GATEWAY ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$webPublicGatewayFolder/Dockerfile" -t eshoponabp/gateway-web-public:$version .
# ### PUBLICWEB-GATEWAY
# Write-Host "**************** BUILDING WEB-PUBLIC-GATEWAY ****************" -ForegroundColor Green
# Set-Location $slnFolder
# 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
Write-Host "**************** BUILDING IDENTITY-SERVICE ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$identityServiceFolder/Dockerfile" -t eshoponabp/service-identity:$version .
# ### IDENTITY-SERVICE
# Write-Host "**************** BUILDING IDENTITY-SERVICE ****************" -ForegroundColor Green
# Set-Location $slnFolder
# docker build -f "$identityServiceFolder/Dockerfile" -t eshoponabp/service-identity:$version .
### ADMINISTRATION-SERVICE
Write-Host "**************** BUILDING ADMINISTRATION-SERVICE ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$administrationServiceFolder/Dockerfile" -t eshoponabp/service-administration:$version .
# ### ADMINISTRATION-SERVICE
# Write-Host "**************** BUILDING ADMINISTRATION-SERVICE ****************" -ForegroundColor Green
# Set-Location $slnFolder
# docker build -f "$administrationServiceFolder/Dockerfile" -t eshoponabp/service-administration:$version .
### SAAS-SERVICE
Write-Host "**************** BUILDING SAAS-SERVICE ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$saasServiceFolder/Dockerfile" -t eshoponabp/service-saas:$version .
# ### SAAS-SERVICE
# Write-Host "**************** BUILDING SAAS-SERVICE ****************" -ForegroundColor Green
# Set-Location $slnFolder
# docker build -f "$saasServiceFolder/Dockerfile" -t eshoponabp/service-saas:$version .
### ALL COMPLETED
Write-Host "ALL COMPLETED" -ForegroundColor Green

Loading…
Cancel
Save