Skip to content

πŸš€ Production-ready CI/CD pipeline for containerized E-Commerce MERN application using Docker, GitHub Actions, and Render. Built for DevOps automation and cloud deployment.

Notifications You must be signed in to change notification settings

elonerajeev/E-Commerce-App-Deployment-Pipeline-

Repository files navigation

πŸš€ MERN E-Commerce App Deployment Pipeline

CI/CD Pipeline for MERN App

Welcome to the CI/CD Pipeline for a MERN E-Commerce Application! This repository demonstrates a complete DevOps workflow using Docker, GitHub Actions, and Render for deploying a full-stack MERN (MongoDB, Express, React, Node.js) app.

alt text


πŸ“¦ Project Structure

πŸ“¦E-Commerce-App-Deployment-Pipeline-
β”œβ”€β”€ backend/                         # Express.js backend
β”‚   β”œβ”€β”€ config/                      # Configuration files (DB, env, etc.)
β”‚   β”œβ”€β”€ controllers/                 # Route controllers
β”‚   β”œβ”€β”€ middleware/                  # Express middleware
β”‚   β”œβ”€β”€ models/                      # Mongoose models
β”‚   β”œβ”€β”€ routes/                      # Express routes
β”‚   β”œβ”€β”€ utils/                       # Utility functions
β”‚   β”œβ”€β”€ .env.example                 # Example environment variables
β”‚   β”œβ”€β”€ Dockerfile                   # Backend Dockerfile
β”‚   β”œβ”€β”€ package.json
β”‚   └── server.js                    # Entry point
β”œβ”€β”€ frontend/                        # React.js frontend
β”‚   β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ assets/                  # Images and static assets
β”‚   β”‚   β”œβ”€β”€ components/              # React components
β”‚   β”‚   β”œβ”€β”€ pages/                   # React pages
β”‚   β”‚   β”œβ”€β”€ redux/                   # Redux store, slices, actions
β”‚   β”‚   β”œβ”€β”€ utils/                   # Utility functions
β”‚   β”‚   β”œβ”€β”€ App.js
β”‚   β”‚   └── index.js
β”‚   β”œβ”€β”€ .env.example                 # Example frontend env variables
β”‚   β”œβ”€β”€ Dockerfile                   # Frontend Dockerfile
β”‚   └── package.json
β”œβ”€β”€ .github/
β”‚   └── workflows/
β”‚       └── ci-cd.yml                # GitHub Actions workflow
β”œβ”€β”€ .gitignore
β”œβ”€β”€ docker-compose.yml               # Docker Compose for local dev
└── README.md

πŸ“Œ What This Pipeline Does

βœ… Automatically builds both frontend and backend Docker images
βœ… Pushes images to Docker Hub
βœ… Triggers Render deployments using deploy hooks
βœ… Skips manual approval for fully automated deployment
βœ… Uses GitHub Actions for CI/CD pipeline


πŸ› οΈ Technologies Used

  • βš™οΈ GitHub Actions – CI/CD automation
  • 🐳 Docker – Containerization
  • ☁️ Render – Cloud deployment
  • πŸ’Ύ MongoDB Atlas – Cloud database
  • 🌐 Node.js & Express.js – Backend
  • 🧠 React.js – Frontend

🌐 Live Demo Links


🚦 CI/CD Pipeline Flow Diagram

alt text alt text

πŸ” Workflow Stages

  1. Push to main branch
  2. βœ… CI: Install, Lint, and Build code
  3. πŸ› οΈ Docker Build for Frontend & Backend
  4. πŸ“¦ Push Docker Images to Docker Hub
  5. πŸš€ Trigger Deploy Hooks on Render

πŸ’‘ Want to try it yourself? Fork this repo and set your own Docker & Render secrets!


πŸ” Secrets Configuration (GitHub β†’ Settings β†’ Secrets β†’ Actions)

Secret Name Description
DOCKER_USERNAME Your Docker Hub username
DOCKER_PASSWORD Docker Hub access token/password
RENDER_DEPLOY_HOOK_FRONTEND Render deploy hook for frontend
RENDER_DEPLOY_HOOK_BACKEND Render deploy hook for backend

βœ… Workflow Badge

Display this badge in your repo to show the pipeline status:

CI/CD Pipeline for MERN App

πŸ“Έ Screenshots

βœ… GitHub Actions Pipeline Passed

alt text CI/CD Pipeline for MERN App

πŸ–₯️ Live Frontend on Render

alt text

alt text

alt text

🧠 Backend API Connected to MongoDB

alt text

🀝 Author

Made with ❀️ by Rajeev Kumar (Elone Rajeev)


πŸ“„ License

This project is licensed under the MIT License.

πŸ”„ Always feel free to contribute or suggest improvements!

About

πŸš€ Production-ready CI/CD pipeline for containerized E-Commerce MERN application using Docker, GitHub Actions, and Render. Built for DevOps automation and cloud deployment.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages