Skip to content

Srireddy88/TASK-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TASK-1 DAY-1

Node.js CI/CD Pipeline Demo using GitHub Actions & Docker

This is a simple Node.js web application built using Express.js.
It demonstrates how to automate the process of building and deploying Docker containers using GitHub Actions CI/CD pipeline.


Tools Used

  • Node.js with Express
  • Docker for containerization
  • GitHub Actions for CI/CD automation
  • DockerHub to host built images

What I Did

  • Created a simple Express.js server

  • Wrote a Dockerfile to containerize the app

  • Set up .github/workflows/main.yml for CI/CD pipeline

  • Stored DockerHub credentials in GitHub Secrets

  • Changed the branch name into master into main

  • Screenshot 2025-04-07 184649

  • On every push to the master branch:

  • GitHub Actions builds the Docker image

  • Tags it with the branch name

  • Pushes it to DockerHub automatically Screenshot 2025-04-07 184606


GitHub Secrets Required

  • DOCKER_USERNAME – Your DockerHub username
  • DOCKER_PASSWORD – Your DockerHub password or access token

Run Locally Using Docker

You can pull the image from DockerHub and run it:

Run the App via Docker

Pull the Docker image and run the container:

Screenshot 2025-04-07 190739

docker pull srilakshmiyannam/nodejs-demo-app:master
docker run -p 3000:3000 srilakshmiyannam/nodejs-demo-app:master



About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors