diff --git a/apps/angular/Dockerfile.azure b/apps/angular/Dockerfile.azure new file mode 100644 index 00000000..e4aa6cf8 --- /dev/null +++ b/apps/angular/Dockerfile.azure @@ -0,0 +1,15 @@ +FROM node:18-alpine as build + +WORKDIR /app +COPY package*.json /app/ + +RUN yarn 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 diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/Dockerfile.azure b/apps/public-web/src/EShopOnAbp.PublicWeb/Dockerfile.azure new file mode 100644 index 00000000..ae79ac14 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/Dockerfile.azure @@ -0,0 +1,10 @@ +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +WORKDIR /src +COPY eShopOnAbp ./eShopOnAbp +WORKDIR /src/eShopOnAbp/apps/public-web/src/EShopOnAbp.PublicWeb +RUN dotnet publish -c Release -o bin/Release/publish + +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final +WORKDIR /app +COPY --from=build /src/eShopOnAbp/apps/public-web/src/EShopOnAbp.PublicWeb/bin/Release/publish/ . +ENTRYPOINT ["dotnet", "EShopOnAbp.PublicWeb.dll"] \ No newline at end of file diff --git a/etc/k8s/azure/azure-pipelines.yml b/etc/k8s/azure/azure-pipelines.yml new file mode 100644 index 00000000..d5273739 --- /dev/null +++ b/etc/k8s/azure/azure-pipelines.yml @@ -0,0 +1,463 @@ +trigger: + branches: + include: + - skoc/azure-pipeline + paths: + include: + - apps/angular/src/** + - apps/public-web/src/EShopOnAbp.PublicWeb/** + - gateways/web/src/EShopOnAbp.WebGateway/** + - gateways/web-public/src/EShopOnAbp.WebPublicGateway/** + - services/administration/src/** + - services/basket/src/** + - services/catalog/src/** + - services/cmskit/src/** + - services/identity/src/** + - services/ordering/src/** + - services/payment/src/** + +resources: + repositories: + - repository: devops + type: github + endpoint: github.com_skoc10 + name: volosoft/devops + ref: master + +variables: + dockerRegistryServiceConnection: 'volosoft-reg' + buildContextBasePath: '$(Build.SourcesDirectory)' + tag: $(Build.BuildNumber) + DOCKER_BUILDKIT: 1 + +pool: + name: aks-deployer-agent + +stages: +- stage: Build + displayName: Build + jobs: + - job: Build + displayName: Build and Deploy Microservices + pool: + name: aks-deployer-agent + steps: + - checkout: self + - checkout: devops + + - script: | + function hasChanged { + local path=$1 + if git diff --name-only HEAD HEAD~1 | grep -q $path; then + echo "true" + else + echo "false" + fi + } + echo "##vso[task.setvariable variable=hasChangedAngular]$(hasChanged 'apps/angular/src/')" + echo "##vso[task.setvariable variable=hasChangedPublicWeb]$(hasChanged 'apps/public-web/src/EShopOnAbp.PublicWeb/')" + echo "##vso[task.setvariable variable=hasChangedWebGateway]$(hasChanged 'gateways/web/src/EShopOnAbp.WebGateway/')" + echo "##vso[task.setvariable variable=hasChangedWebPublicGateway]$(hasChanged 'gateways/web-public/src/EShopOnAbp.WebPublicGateway/')" + echo "##vso[task.setvariable variable=hasChangedAdministration]$(hasChanged 'services/administration/src/')" + echo "##vso[task.setvariable variable=hasChangedBasket]$(hasChanged 'services/basket/src/')" + echo "##vso[task.setvariable variable=hasChangedCatalog]$(hasChanged 'services/catalog/src/')" + echo "##vso[task.setvariable variable=hasChangedCmsKit]$(hasChanged 'services/cmskit/src/')" + echo "##vso[task.setvariable variable=hasChangedIdentity]$(hasChanged 'services/identity/src/')" + echo "##vso[task.setvariable variable=hasChangedOrdering]$(hasChanged 'services/ordering/src/')" + echo "##vso[task.setvariable variable=hasChangedPayment]$(hasChanged 'services/payment/src/')" + displayName: 'Check if the services have changed' + +# Angular App + - task: Docker@2 + #condition: and(succeeded(), eq(variables['hasChangedAngular'], 'true')) + displayName: 'Build Angular App' + inputs: + command: build + repository: eshoponabp/app-web + dockerfile: $(buildContextBasePath)/eShopOnAbp/apps/angular/Dockerfile.azure + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) + - task: Docker@2 + #condition: and(succeeded(), eq(variables['hasChangedAngular'], 'true')) + displayName: 'Push Angular App' + inputs: + command: push + repository: eshoponabp/app-web + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) + # - task: HelmDeploy@0 + # #condition: and(succeeded(), eq(variables['hasChangedAngular'], 'true')) + # displayName: 'Deploy Angular App' + # inputs: + # connectionType: Kubernetes Service Connection + # kubernetesServiceConnection: 'aks-demoms' + # namespace: 'eshop' + # command: 'upgrade' + # hartType: 'FilePath' + # chartPath: 'devops/eshoponabp/k8s/eshoponabp-istio/charts/web' + # releaseName: 'administration' + # overrideValues: 'image.tag=$(tag)' + # valueFile: 'devops/eshoponabp/k8s/eshoponabp-istio/charts/web/values.yaml' + # waitForExecution: false + +# Public Web + - task: Docker@2 + #condition: and(succeeded(), eq(variables['hasChangedPublicWeb'], 'true')) + displayName: 'Build Public Web' + inputs: + command: build + repository: eshoponabp/app-publicweb + dockerfile: $(buildContextBasePath)/eShopOnAbp/apps/public-web/src/EShopOnAbp.PublicWeb/Dockerfile.azure + buildContext: $(buildContextBasePath) + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) + - task: Docker@2 + #condition: and(succeeded(), eq(variables['hasChangedPublicWeb'], 'true')) + displayName: 'Push Public Web' + inputs: + command: push + repository: eshoponabp/app-publicweb + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) + # - task: HelmDeploy@0 + # #condition: and(succeeded(), eq(variables['hasChangedPublicWeb'], 'true')) + # displayName: 'Deploy Public Web' + # inputs: + # connectionType: Kubernetes Service Connection + # kubernetesServiceConnection: 'aks-demoms' + # namespace: 'eshop' + # command: 'upgrade' + # hartType: 'FilePath' + # chartPath: 'devops/eshoponabp/k8s/eshoponabp-istio/charts/public-web' + # releaseName: 'public-web' + # overrideValues: 'image.tag=$(tag)' + # valueFile: 'devops/eshoponabp/k8s/eshoponabp-istio/charts/public-web/values.yaml' + # waitForExecution: false + +# Web Gateway + - task: Docker@2 + #condition: and(succeeded(), eq(variables['hasChangedWebGateway'], 'true')) + displayName: 'Build Web Gateway' + inputs: + command: build + repository: eshoponabp/gateway-web + dockerfile: $(buildContextBasePath)/eShopOnAbp/gateways/web/src/EShopOnAbp.WebGateway/Dockerfile.azure + buildContext: $(buildContextBasePath) + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) + - task: Docker@2 + #condition: and(succeeded(), eq(variables['hasChangedWebGateway'], 'true')) + displayName: 'Push Web Gateway' + inputs: + command: push + repository: eshoponabp/gateway-web + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) + # - task: HelmDeploy@0 + # #condition: and(succeeded(), eq(variables['hasChangedWebGateway'], 'true')) + # displayName: 'Deploy Web Gateway' + # inputs: + # connectionType: Kubernetes Service Connection + # kubernetesServiceConnection: 'aks-demoms' + # namespace: 'eshop' + # command: 'upgrade' + # hartType: 'FilePath' + # chartPath: 'devops/eshoponabp/k8s/eshoponabp-istio/charts/gateway-web' + # releaseName: 'web-gateway' + # overrideValues: 'image.tag=$(tag)' + # valueFile: 'devops/eshoponabp/k8s/eshoponabp-istio/charts/gateway-web/values.yaml' + # waitForExecution: false + +# Web Public Gateway + - task: Docker@2 + #condition: and(succeeded(), eq(variables['hasChangedWebPublicGateway'], 'true')) + displayName: 'Build Web Public Gateway' + inputs: + command: build + repository: eshoponabp/gateway-web-public + dockerfile: $(buildContextBasePath)/eShopOnAbp/gateways/web-public/src/EShopOnAbp.WebPublicGateway/Dockerfile.azure + buildContext: $(buildContextBasePath) + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) + - task: Docker@2 + #condition: and(succeeded(), eq(variables['hasChangedWebPublicGateway'], 'true')) + displayName: 'Push Web Public Gateway' + inputs: + command: push + repository: eshoponabp/gateway-web-public + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) + # - task: HelmDeploy@0 + # #condition: and(succeeded(), eq(variables['hasChangedWebPublicGateway'], 'true')) + # displayName: 'Deploy Web Public Gateway' + # inputs: + # connectionType: Kubernetes Service Connection + # kubernetesServiceConnection: 'aks-demoms' + # namespace: 'eshop' + # command: 'upgrade' + # hartType: 'FilePath' + # chartPath: 'devops/eshoponabp/k8s/eshoponabp-istio/charts/gateway-web-public' + # releaseName: 'web-public-gateway' + # overrideValues: 'image.tag=$(tag)' + # valueFile: 'devops/eshoponabp/k8s/eshoponabp-istio/charts/gateway-web-public/values.yaml' + # waitForExecution: false + +# Administration + - task: Docker@2 + #condition: and(succeeded(), eq(variables['hasChangedAdministration'], 'true')) + displayName: 'Build Administration' + inputs: + command: build + repository: eshoponabp/service-administration + dockerfile: $(buildContextBasePath)/eShopOnAbp/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/Dockerfile.azure + buildContext: $(buildContextBasePath) + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) + - task: Docker@2 + #condition: and(succeeded(), eq(variables['hasChangedAdministration'], 'true')) + displayName: 'Push Administration' + inputs: + command: push + repository: eshoponabp/service-administration + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) + # - task: HelmDeploy@0 + # #condition: and(succeeded(), eq(variables['hasChangedAdministration'], 'true')) + # displayName: 'Deploy Administration' + # inputs: + # connectionType: Kubernetes Service Connection + # kubernetesServiceConnection: 'aks-demoms' + # namespace: 'eshop' + # command: 'upgrade' + # hartType: 'FilePath' + # chartPath: 'devops/eshoponabp/k8s/eshoponabp-istio/charts/administration' + # releaseName: 'administration' + # overrideValues: 'image.tag=$(tag)' + # valueFile: 'devops/eshoponabp/k8s/eshoponabp-istio/charts/administration/values.yaml' + # waitForExecution: false + +# Basket + - task: Docker@2 + #condition: and(succeeded(), eq(variables['hasChangedBasket'], 'true')) + displayName: 'Build Basket' + inputs: + command: build + repository: eshoponabp/service-basket + dockerfile: $(buildContextBasePath)/eShopOnAbp/services/basket/src/EShopOnAbp.BasketService/Dockerfile.azure + buildContext: $(buildContextBasePath) + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) + - task: Docker@2 + #condition: and(succeeded(), eq(variables['hasChangedBasket'], 'true')) + displayName: 'Push Basket' + inputs: + command: push + repository: eshoponabp/service-basket + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) + # - task: HelmDeploy@0 + # #condition: and(succeeded(), eq(variables['hasChangedBasket'], 'true')) + # displayName: 'Deploy Basket' + # inputs: + # connectionType: Kubernetes Service Connection + # kubernetesServiceConnection: 'aks-demoms' + # namespace: 'eshop' + # command: 'upgrade' + # hartType: 'FilePath' + # chartPath: 'devops/eshoponabp/k8s/eshoponabp-istio/charts/basket' + # releaseName: 'basket' + # overrideValues: 'image.tag=$(tag)' + # valueFile: 'devops/eshoponabp/k8s/eshoponabp-istio/charts/basket/values.yaml' + # waitForExecution: false + +# Catalog + - task: Docker@2 + #condition: and(succeeded(), eq(variables['hasChangedCatalog'], 'true')) + displayName: 'Build Catalog' + inputs: + command: build + repository: eshoponabp/service-catalog + dockerfile: $(buildContextBasePath)/eShopOnAbp/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/Dockerfile.azure + buildContext: $(buildContextBasePath) + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) + - task: Docker@2 + #condition: and(succeeded(), eq(variables['hasChangedCatalog'], 'true')) + displayName: 'Push Catalog' + inputs: + command: push + repository: eshoponabp/service-catalog + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) + # - task: HelmDeploy@0 + # #condition: and(succeeded(), eq(variables['hasChangedCatalog'], 'true')) + # displayName: 'Deploy Catalog' + # inputs: + # connectionType: Kubernetes Service Connection + # kubernetesServiceConnection: 'aks-demoms' + # namespace: 'eshop' + # command: 'upgrade' + # hartType: 'FilePath' + # chartPath: 'devops/eshoponabp/k8s/eshoponabp-istio/charts/catalog' + # releaseName: 'catalog' + # overrideValues: 'image.tag=$(tag)' + # valueFile: 'devops/eshoponabp/k8s/eshoponabp-istio/charts/catalog/values.yaml' + # waitForExecution: false + +# cmskit + - task: Docker@2 + #condition: and(succeeded(), eq(variables['hasChangedCmsKit'], 'true')) + displayName: 'Build CmsKit' + inputs: + command: build + repository: eshoponabp/service-cmskit + dockerfile: $(buildContextBasePath)/eShopOnAbp/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/Dockerfile.azure + buildContext: $(buildContextBasePath) + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) + - task: Docker@2 + #condition: and(succeeded(), eq(variables['hasChangedCmsKit'], 'true')) + displayName: 'Push CmsKit' + inputs: + command: push + repository: eshoponabp/service-cmskit + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) + # - task: HelmDeploy@0 + # #condition: and(succeeded(), eq(variables['hasChangedCmsKit'], 'true')) + # displayName: 'Deploy CmsKit' + # inputs: + # connectionType: Kubernetes Service Connection + # kubernetesServiceConnection: 'aks-demoms' + # namespace: 'eshop' + # command: 'upgrade' + # hartType: 'FilePath' + # chartPath: 'devops/eshoponabp/k8s/eshoponabp-istio/charts/cmskit' + # releaseName: 'cmskit' + # overrideValues: 'image.tag=$(tag)' + # valueFile: 'devops/eshoponabp/k8s/eshoponabp-istio/charts/cmskit/values.yaml' + # waitForExecution: false + +# Identity + - task: Docker@2 + #condition: and(succeeded(), eq(variables['hasChangedIdentity'], 'true')) + displayName: 'Build Identity' + inputs: + command: build + repository: eshoponabp/service-identity + dockerfile: $(buildContextBasePath)/eShopOnAbp/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/Dockerfile.azure + buildContext: $(buildContextBasePath) + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) + - task: Docker@2 + #condition: and(succeeded(), eq(variables['hasChangedIdentity'], 'true')) + displayName: 'Push Identity' + inputs: + command: push + repository: eshoponabp/service-identity + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) + # - task: HelmDeploy@0 + # #condition: and(succeeded(), eq(variables['hasChangedIdentity'], 'true')) + # displayName: 'Deploy Identity' + # inputs: + # connectionType: Kubernetes Service Connection + # kubernetesServiceConnection: 'aks-demoms' + # namespace: 'eshop' + # command: 'upgrade' + # hartType: 'FilePath' + # chartPath: 'devops/eshoponabp/k8s/eshoponabp-istio/charts/identity' + # releaseName: 'identity' + # overrideValues: 'image.tag=$(tag)' + # valueFile: 'devops/eshoponabp/k8s/eshoponabp-istio/charts/identity/values.yaml' + # waitForExecution: false + +# Ordering + - task: Docker@2 + #condition: and(succeeded(), eq(variables['hasChangedOrdering'], 'true')) + displayName: 'Build Ordering' + inputs: + command: build + repository: eshoponabp/service-ordering + dockerfile: $(buildContextBasePath)/eShopOnAbp/services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/Dockerfile.azure + buildContext: $(buildContextBasePath) + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) + - task: Docker@2 + #condition: and(succeeded(), eq(variables['hasChangedOrdering'], 'true')) + displayName: 'Push Ordering' + inputs: + command: push + repository: eshoponabp/service-ordering + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) + # - task: HelmDeploy@0 + # #condition: and(succeeded(), eq(variables['hasChangedOrdering'], 'true')) + # displayName: 'Deploy Ordering' + # inputs: + # connectionType: Kubernetes Service Connection + # kubernetesServiceConnection: 'aks-demoms' + # namespace: 'eshop' + # command: 'upgrade' + # hartType: 'FilePath' + # chartPath: 'devops/eshoponabp/k8s/eshoponabp-istio/charts/ordering' + # releaseName: 'ordering' + # overrideValues: 'image.tag=$(tag)' + # valueFile: 'devops/eshoponabp/k8s/eshoponabp-istio/charts/ordering/values.yaml' + # waitForExecution: false + +# Payment + - task: Docker@2 + #condition: and(succeeded(), eq(variables['hasChangedPayment'], 'true')) + displayName: 'Build Payment' + inputs: + command: build + repository: eshoponabp/service-payment + dockerfile: $(buildContextBasePath)/eShopOnAbp/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/Dockerfile.azure + buildContext: $(buildContextBasePath) + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) + - task: Docker@2 + #condition: and(succeeded(), eq(variables['hasChangedPayment'], 'true')) + displayName: 'Push Payment' + inputs: + command: push + repository: eshoponabp/service-payment + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) + # - task: HelmDeploy@0 + # #condition: and(succeeded(), eq(variables['hasChangedPayment'], 'true')) + # displayName: 'Deploy Payment' + # inputs: + # connectionType: Kubernetes Service Connection + # kubernetesServiceConnection: 'aks-demoms' + # namespace: 'eshop' + # command: 'upgrade' + # hartType: 'FilePath' + # chartPath: 'devops/eshoponabp/k8s/eshoponabp-istio/charts/payment' + # releaseName: 'payment' + # overrideValues: 'image.tag=$(tag)' + # valueFile: 'devops/eshoponabp/k8s/eshoponabp-istio/charts/payment/values.yaml' + # waitForExecution: false \ No newline at end of file diff --git a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/Dockerfile.azure b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/Dockerfile.azure new file mode 100644 index 00000000..e562309c --- /dev/null +++ b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/Dockerfile.azure @@ -0,0 +1,10 @@ +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +WORKDIR /src +COPY eShopOnAbp ./eShopOnAbp +WORKDIR /src/eShopOnAbp/gateways/web-public/src/EShopOnAbp.WebPublicGateway +RUN dotnet publish -c Release -o bin/Release/publish + +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final +WORKDIR /app +COPY --from=build /src/eShopOnAbp/gateways/web-public/src/EShopOnAbp.WebPublicGateway/bin/Release/publish/ . +ENTRYPOINT ["dotnet", "EShopOnAbp.WebPublicGateway.dll"] \ No newline at end of file diff --git a/gateways/web/src/EShopOnAbp.WebGateway/Dockerfile.azure b/gateways/web/src/EShopOnAbp.WebGateway/Dockerfile.azure new file mode 100644 index 00000000..fe0a77e0 --- /dev/null +++ b/gateways/web/src/EShopOnAbp.WebGateway/Dockerfile.azure @@ -0,0 +1,10 @@ +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +WORKDIR /src +COPY eShopOnAbp ./eShopOnAbp +WORKDIR /src/eShopOnAbp/gateways/web/src/EShopOnAbp.WebGateway +RUN dotnet publish -c Release -o bin/Release/publish + +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final +WORKDIR /app +COPY --from=build /src/eShopOnAbp/gateways/web/src/EShopOnAbp.WebGateway/bin/Release/publish/ . +ENTRYPOINT ["dotnet", "EShopOnAbp.WebGateway.dll"] \ No newline at end of file diff --git a/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/Dockerfile.azure b/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/Dockerfile.azure new file mode 100644 index 00000000..6c0a76a7 --- /dev/null +++ b/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/Dockerfile.azure @@ -0,0 +1,10 @@ +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +WORKDIR /src +COPY eShopOnAbp ./eShopOnAbp +WORKDIR /src/eShopOnAbp/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host +RUN dotnet publish -c Release -o bin/Release/publish + +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final +WORKDIR /app +COPY --from=build /src/eShopOnAbp/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/bin/Release/publish/ . +ENTRYPOINT ["dotnet", "EShopOnAbp.AdministrationService.HttpApi.Host.dll"] \ No newline at end of file diff --git a/services/basket/src/EShopOnAbp.BasketService/Dockerfile.azure b/services/basket/src/EShopOnAbp.BasketService/Dockerfile.azure new file mode 100644 index 00000000..db788eb2 --- /dev/null +++ b/services/basket/src/EShopOnAbp.BasketService/Dockerfile.azure @@ -0,0 +1,10 @@ +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +WORKDIR /src +COPY eShopOnAbp ./eShopOnAbp +WORKDIR /src/eShopOnAbp/services/basket/src/EShopOnAbp.BasketService +RUN dotnet publish -c Release -o bin/Release/publish + +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final +WORKDIR /app +COPY --from=build /src/eShopOnAbp/services/basket/src/EShopOnAbp.BasketService/bin/Release/publish/ . +ENTRYPOINT ["dotnet", "EShopOnAbp.BasketService.dll"] \ No newline at end of file diff --git a/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/Dockerfile.azure b/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/Dockerfile.azure new file mode 100644 index 00000000..f8380a9b --- /dev/null +++ b/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/Dockerfile.azure @@ -0,0 +1,10 @@ +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +WORKDIR /src +COPY eShopOnAbp ./eShopOnAbp +WORKDIR /src/eShopOnAbp/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host +RUN dotnet publish -c Release -o bin/Release/publish + +FROM mcr.microsoft.com/dotnet/aspnet:8.0 +WORKDIR /app +COPY --from=build /src/eShopOnAbp/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/bin/Release/publish/ . +ENTRYPOINT ["dotnet", "EShopOnAbp.CatalogService.HttpApi.Host.dll"] \ No newline at end of file diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/Dockerfile.azure b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/Dockerfile.azure new file mode 100644 index 00000000..5d6106ed --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/Dockerfile.azure @@ -0,0 +1,10 @@ +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +WORKDIR /src +COPY eShopOnAbp ./eShopOnAbp +WORKDIR /src/eShopOnAbp/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host +RUN dotnet publish -c Release -o bin/Release/publish + +FROM mcr.microsoft.com/dotnet/aspnet:8.0 +WORKDIR /app +COPY --from=build /src/eShopOnAbp/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/bin/Release/publish/ . +ENTRYPOINT ["dotnet", "EShopOnAbp.CmskitService.HttpApi.Host.dll"] \ No newline at end of file diff --git a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/Dockerfile.azure b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/Dockerfile.azure new file mode 100644 index 00000000..5f9c074c --- /dev/null +++ b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/Dockerfile.azure @@ -0,0 +1,10 @@ +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +WORKDIR /src +COPY eShopOnAbp ./eShopOnAbp +WORKDIR /src/eShopOnAbp/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host +RUN dotnet publish -c Release -o bin/Release/publish + +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final +WORKDIR /app +COPY --from=build /src/eShopOnAbp/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/bin/Release/publish/ . +ENTRYPOINT ["dotnet", "EShopOnAbp.IdentityService.HttpApi.Host.dll"] \ No newline at end of file diff --git a/services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/Dockerfile.azure b/services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/Dockerfile.azure new file mode 100644 index 00000000..8e065f29 --- /dev/null +++ b/services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/Dockerfile.azure @@ -0,0 +1,10 @@ +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +WORKDIR /src +COPY eShopOnAbp ./eShopOnAbp +WORKDIR /src/eShopOnAbp/services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host +RUN dotnet publish -c Release -o bin/Release/publish + +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final +WORKDIR /app +COPY --from=build /src/eShopOnAbp/services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/bin/Release/publish/ . +ENTRYPOINT ["dotnet", "EShopOnAbp.OrderingService.HttpApi.Host.dll"] \ No newline at end of file diff --git a/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/Dockerfile.azure b/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/Dockerfile.azure new file mode 100644 index 00000000..11a5f2fe --- /dev/null +++ b/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/Dockerfile.azure @@ -0,0 +1,10 @@ +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +WORKDIR /src +COPY eShopOnAbp ./eShopOnAbp +WORKDIR /src/eShopOnAbp/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host +RUN dotnet publish -c Release -o bin/Release/publish + +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final +WORKDIR /app +COPY --from=build /src/eShopOnAbp/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/bin/Release/publish/ . +ENTRYPOINT ["dotnet", "EShopOnAbp.PaymentService.HttpApi.Host.dll"] \ No newline at end of file