Skip to content

Latest commit

 

History

41 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PROD-MERN-DEVOPS

Production-oriented MERN E-Commerce application containerized with Docker and deployed on Kubernetes.

The project demonstrates a DevOps workflow around a MERN application, including containerization, Kubernetes deployments, service discovery, Ingress routing, health checks, autoscaling, Redis caching, MongoDB persistence and application configuration through Kubernetes resources.


Architecture

                         ┌─────────────────┐
                         │      User       │
                         └────────┬────────┘
                                  │
                                  ▼
                         ┌─────────────────┐
                         │ NGINX Ingress   │
                         │    Controller   │
                         └────────┬────────┘
                                  │
                                  ▼
                    ┌─────────────────────────┐
                    │   Frontend Service      │
                    └────────────┬────────────┘
                                 │
                                 ▼
                    ┌─────────────────────────┐
                    │ React Frontend          │
                    │ NGINX Container         │
                    └────────────┬────────────┘
                                 │
                                 │ API Requests
                                 ▼
                    ┌─────────────────────────┐
                    │   Backend Service       │
                    │        :5000            │
                    └────────────┬────────────┘
                                 │
                 ┌───────────────┴───────────────┐
                 │                               │
                 ▼                               ▼
       ┌──────────────────┐             ┌──────────────────┐
       │ Node.js /        │             │      Redis       │
       │ Express Backend  │             │      Cache       │
       │                  │             │      :6379       │
       └────────┬─────────┘             └──────────────────┘
                │
                ▼
       ┌──────────────────┐
       │     MongoDB      │
       │     :27017       │
       │    StatefulSet   │
       └──────────────────┘



### Setup .env file

```bash
PORT=5000
MONGO_URI=your_mongo_uri

UPSTASH_REDIS_URL=your_redis_url

ACCESS_TOKEN_SECRET=your_access_token_secret
REFRESH_TOKEN_SECRET=your_refresh_token_secret

CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret

STRIPE_SECRET_KEY=your_stripe_secret_key
CLIENT_URL=http://localhost:5173
NODE_ENV=development

Run this app locally

npm run build

Start the app

npm run start

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages