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.
- Runtime: Node.js
- Containers: Docker
- CI/CD: Jenkins (declarative pipeline)
- Image Registry: AWS ECR
- Deployment: AWS EC2 + Application Load Balancer
TheJenkinsfile here handles everything automatically across these stages:
- Prep: Sets up AWS region and ECR URI environment vars.
- Code Pull: Grabs the latest from this GitHub repo.
- Build: Creates a lean production-ready Docker image for the Node app.
- Security & Push: Authenticates to ECR and pushes the tagged image.
- 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.
- Provision your infra using the Terraform repo.
- Configure servers with the Ansible repo (search if the link glitches).
- Set up a new Pipeline project in Jenkins.
- In "Pipeline Script from SCM," drop in this repo's GitHub URL.
- Add your AWS and SSH creds to Jenkins' credential store.
- Hit Build Now.
When all pipeline stages turn green, hit up the app at the AWS Load Balancer DNS:
http://<ALB-DNS-NAME>:8081