Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Azure DevOps CI/CD Demo: Node.js & Docker

Build Status License: MIT Node.js Version

A production-grade demonstration of Modern DevOps practices using Azure DevOps, Docker, and Node.js. This repository showcases a complete automated lifecycle—from code commit to containerized deployment on Azure App Service.

🌟 Key Features

  • Automated CI Pipeline: Multi-stage YAML pipeline for building, testing, and containerizing.
  • Docker Integration: Optimized Dockerfile for Node.js production environments.
  • Advanced CD Strategy:
    • Deployment Slots: Zero-downtime deployments using Azure App Service staging slots.
    • Manual Approvals: Integrated gatekeeping for production releases.
    • Automated Rollbacks: Logic to handle deployment failures gracefully.
  • Observability: Built-in health check endpoints for infrastructure monitoring.

🏗️ Architecture Overview

The pipeline is split into three main stages:

  1. Build & Test: Installs dependencies, executes unit tests, builds the Docker image, and pushes it to Azure Container Registry (ACR).
  2. Deploy to Staging: Deploys the latest container to a staging slot for validation.
  3. Production Release: Requires manual sign-off before swapping slots to live traffic.

🛠️ Tech Stack

  • Backend: Node.js, Express.js
  • Testing: Mocha, Supertest
  • Containerization: Docker
  • Orchestration/CI-CD: Azure Pipelines (YAML)
  • Cloud: Azure App Service, Azure Container Registry (ACR)

🚀 Getting Started

Local Development

  1. Clone the repo:
    git clone https://github.com/ihkokil/azure-devops-ci-cd-demo.git
  2. Install dependencies:
    npm install
  3. Run tests:
    npm test
  4. Start the app:
    npm start

Pipeline Configuration

To mirror this pipeline in your own Azure DevOps organization:

  1. Create a Service Connection to your Azure Subscription and Docker Registry.
  2. Update the variables in azure-pipelines.yml (Registry URL, App Name, etc.).
  3. Configure the production environment with Approvals and Checks.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A production-ready CI/CD demonstration using Azure DevOps, Node.js, and Docker. Features automated testing, multi-stage YAML pipelines, containerized deployments to Azure App Service, and manual release approvals.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages