π Node.js Demo App β My Journey to Automated Deployment with GitHub Actions & Docker


This month, I challenged myself to take a simple Node.js application and deploy it the way a real DevOps pipeline would β fully automated from code commit to deployment.
No manual builds, no βdocker runβ copy-paste, and no pushing images by hand.
Thatβs how Node.js Demo App was born β a small project that taught me how powerful GitHub Actions can be when paired with Docker.
π Project Overview
The application itself is straightforward β a Node.js web app that serves content on port 3000. But the real focus here wasnβt the appβs complexity, it was the automation pipeline behind it.
Repository: nodejs-demo-app
Structure:
.
βββ app.js # Main app logic
βββ Dockerfile # Container build instructions
βββ package.json # Node.js dependencies
βββ .github/
βββ workflows/
βββ main.yml # GitHub Actions workflow
π οΈ Tools & Technologies
Node.js β For the web app itself
Docker β To package and ship the app in containers
DockerHub β To store and share the container image
GitHub Actions β To automate the build, test, and push process
βοΈ The CI/CD Workflow
The pipeline lives in π .github/workflows/main.yml
and runs every time I push to main
.
Hereβs what happens behind the scenes:
Checkout Code β GitHub Actions pulls the latest code from the repository.
Setup Node.js β The runner gets a Node.js environment ready.
Install Dependencies β Runs
npm install
to set up required packages.Run Tests β Validates the app to make sure nothingβs broken before deployment.
Authenticate with DockerHub β Uses my GitHub Secrets to log in securely.
Build Docker Image β Creates a production-ready container image.
Push to DockerHub β Publishes the image so itβs instantly available anywhere.
π Secure Credentials
To make this work without exposing my password, I stored these secrets in GitHub:
Secret Name | Purpose |
DOCKER_USERNAME | DockerHub username |
DOCKER_PASSWORD | DockerHub password or access token |
π³ Running the App Locally
If you want to run it locally without CI/CD, itβs just:
npm install
npm start
The app runs on http://localhost:3000.
Or, if you want to use my Docker image:
docker pull <dockerhub-username>/<image-name>
docker run -p 3000:3000 <dockerhub-username>/<image-name>
π¦ The Result
The beauty of this setup is that I no longer have to worry about manual builds or deployments. Every time I push code to main
, a new Docker image is automatically built, tested, and pushed to DockerHub.
This is the kind of automation that DevOps is all about β repeatable, reliable, and fast.
πββοΈ About Me
Iβm Harshal Vernekar, an aspiring DevOps & Cloud Engineer passionate about automation, CI/CD, and cloud-native technologies.
Subscribe to my newsletter
Read articles from HARSHAL VERNEKAR directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

HARSHAL VERNEKAR
HARSHAL VERNEKAR
π Aspiring DevOps & Cloud Engineer with a strong foundation in cloud platforms (AWS), infrastructure automation, and container orchestration tools like Docker and Kubernetes. Iβm passionate about building reliable, scalable, and secure cloud-native applications. π§ Currently building real-world projects using Terraform, Ansible, Jenkins, GitHub Actions, and EKS to understand how modern infrastructure is deployed, managed, and monitored. I enjoy breaking things (safely), debugging, and learning from hands-on experience. π¦ Comfortable working with: AWS (EC2, S3, IAM, VPC, EKS) Docker, Kubernetes (Minikube & EKS) CI/CD tools like Jenkins & GitHub Actions IaC tools like Terraform & Ansible Monitoring with Prometheus & Grafana Linux, Bash, Git, and Networking fundamentals π‘ Always learning β currently exploring deeper concepts in Kubernetes workloads, Helm, and scaling best practices. π Open to DevOps, Cloud, or SRE roles where I can grow, contribute, and solve real-world problems.