Skip to content

abdustartus/Node.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repo holds a containerized Node.js app hooked up to a Jenkins Blue Ocean pipeline. It's a full end-to-end demo: commit your code, and it automatically rolls out to production on AWS.

Tech Stack

  • Runtime: Node.js
  • Containers: Docker
  • CI/CD: Jenkins (declarative pipeline)
  • Image Registry: AWS ECR
  • Deployment: AWS EC2 + Application Load Balancer

How the Jenkins Pipeline Works

TheJenkinsfile here handles everything automatically across these stages:

  1. Prep: Sets up AWS region and ECR URI environment vars.
  2. Code Pull: Grabs the latest from this GitHub repo.
  3. Build: Creates a lean production-ready Docker image for the Node app.
  4. Security & Push: Authenticates to ECR and pushes the tagged image.
  5. Blue/Green Deploy:
    • SSHes into the App-Host using apps-host-ssh creds.
    • Pulls the new image from ECR.
    • Stops/removes the old container cleanly.
    • Fires up the new one on port 8081.

Getting It Running

Prerequisites

Quick Deploy Steps

  1. Set up a new Pipeline project in Jenkins.
  2. In "Pipeline Script from SCM," drop in this repo's GitHub URL.
  3. Add your AWS and SSH creds to Jenkins' credential store.
  4. Hit Build Now.

Finding Your App

When all pipeline stages turn green, hit up the app at the AWS Load Balancer DNS:
http://<ALB-DNS-NAME>:8081

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors