Skip to content

Sunil-Dayalan/NodeJS

Repository files navigation

Dockerizing a Node.js web app using Azure YAML Pipelines

In the part of this guide we will build a Docker image for the Node.js Web app , then we will instantiate a container from that image.

Main Objective of this process to deploy the web app using Azure YAML pipelines with enabling continuous deployment when there are changes in the source code.

Note: I already have the code of the app in the git hub repository.

Getting Started:

First the Azure Services used in this project are
  • Azure Registry Container to use it as a repository for the dockerized image from the docker file.
  • Azure WebApp for container to instantiate that image from ACR.

Process:

Create YAML Pipeline for Azure registry container

  • In the Azure devops create & run a yaml pipeline , here I have used github yaml pipeline to create Azure registry container so that it will fetch the templates & parameters from my git repo.
  • Create YAML Pipeline for Building image & WEB APP for container

  • create & run another yaml pipeline to build & Push a dockerized image to the container registry using the docker file from the repo.
  • Then add another stage to create web app for containers to host the image from the ACR. I have deployed 2 stage environments(staging & production)
  • Result:

  • Created Yaml Pipelines will be auto stored in git repo as we chose GitHub Yaml in the first place to create pipelines
  • Resource Created in Azure portal after running the Yaml Pipelines
  • WebApp Before Changes made in the Source Code
  • WebApp After changes made in the source code as we have enabled trigger for Continuous deployment
  • About

    No description, website, or topics provided.

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages