Skip to content

deep-priyo/meanstack-devops-platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ MEAN Stack CRUD Application – Production-Ready DevOps Project

πŸ“Œ Project Overview

This is a end‑to‑end DevOps project showcasing the complete containerization, deployment, and automation of a full-stack MEAN (MongoDB, Express, Angular, Node.js) application.
The app manages a collection of tutorials and supports full CRUD operations plus search β€” all built and shipped with a production mindset.

What I implemented:

  • Docker containerization
  • Cloud deployment
  • Reverse proxy
  • CI/CD automation

πŸ—οΈ Architecture Overview

Developer β†’ GitHub β†’ GitHub Actions (CI/CD)
        β†’ Docker Hub β†’ AWS EC2 β†’ Docker Compose
        β†’ MongoDB β†’ Backend β†’ Frontend β†’ Nginx Reverse Proxy

πŸ› οΈ Tech Stack

πŸ”Ή Backend

  • Node.js
  • Express.js
  • MongoDB
  • Mongoose

πŸ”Ή Frontend

  • Angular 15
  • HTTPClient

πŸ”Ή DevOps & Cloud

  • Docker
  • Docker Compose
  • AWS EC2 (Ubuntu)
  • Nginx
  • GitHub Actions
  • Docker Hub

✨ Features

βœ” Create, Read, Update, Delete tutorials βœ” Search tutorials by title βœ” REST API based architecture βœ” Containerized microservices βœ” Cloud deployment βœ” Reverse proxy on port 80 βœ” Automated CI/CD pipeline βœ” GitOps-style, zero-touch deployments


πŸ“‚ Project Structure

crud-dd-task-mean-app
β”‚
β”œβ”€β”€ backend
β”‚   β”œβ”€β”€ app
β”‚   β”œβ”€β”€ server.js
β”‚   └── Dockerfile
β”‚
β”œβ”€β”€ frontend
β”‚   β”œβ”€β”€ src
β”‚   └── Dockerfile
β”‚
β”œβ”€β”€ docker-compose.yml
└── README.md

βš™οΈ Setup & Installation

πŸ”Ή Clone the repository

git clone https://github.com/deep-priyo/mean-crud-devops
cd mean-crud-devops

πŸ”Ή Backend Setup

cd backend
npm install
node server.js

πŸ”Ή Frontend Setup

cd frontend
npm install
ng serve

Application runs on:

http://localhost:4200

🐳 Docker Containerization

Both frontend and backend are containerized using Docker.

πŸ”Ή Build images

docker build -t <docker-username>/mean-backend ./backend
docker build -t <docker-username>/mean-frontend ./frontend

πŸ”Ή Push to Docker Hub

docker push <docker-username>/mean-backend
docker push <docker-username>/mean-frontend

☁️ Cloud Deployment (AWS EC2)

An Ubuntu EC2 instance was configured with:

  • Docker
  • Docker Compose
  • Nginx

The application is deployed using:

docker compose up -d

MongoDB is deployed as an official Docker container.


πŸ”„ CI/CD Pipeline

GitHub Actions is configured to automate:

  • Docker image build
  • Image push to Docker Hub
  • Automatic deployment on AWS EC2

βœ” Pipeline triggers

The CI/CD workflow is scoped to application and infra changes to avoid unnecessary builds on docs-only commits.

It runs on changes to:

  • Backend source code

  • Frontend source code

  • Dockerfiles and container configurations

  • Deployment and infrastructure configuration files

Documentation-only updates do not trigger the pipeline. This optimization reduces cloud usage and avoids redundant Docker Hub pushes.


🌐 Nginx Reverse Proxy

Nginx is configured to:

  • Route frontend and backend traffic
  • Expose the application on port 80
  • Hide internal container ports
  • Enable production-style deployment

🌐 Application Access

Users can access the deployed application using the EC2 public IPv4 address:

http://<EC2-public-ipv4-address>

Example:

http://13.127.148.3

⚠️ Note: The public IPv4 address of the EC2 instance is dynamic and may change when the instance is stopped and restarted.
In production, pin with an Elastic IP or use a custom domain + DNS + HTTPS (SSL).


πŸ’Ύ Persistent Database & Storage Optimization

To ensure production reliability and prevent data loss, additional improvements were implemented in the infrastructure.

πŸ”Ή MongoDB Persistent Storage

Initially, MongoDB data was lost whenever Docker containers were restarted.
To solve this, a named Docker volume was configured:

mongo:
  image: mongo
  container_name: mongo
  restart: always
  ports:
    - "27017:27017"
  volumes:
    - mongo-data:/data/db

πŸ” Security Considerations

βœ” Docker containers isolated βœ” MongoDB internal network βœ” SSH secure access βœ” Secrets managed using GitHub Actions βœ” Reverse proxy architecture

πŸ“Έ Screenshots & Demo

πŸ”Ή 1. Application UI – Cloud Deployment

Tutorials List – Cloud Deployment UI

This is the main dashboard of the MEAN stack CRUD app deployed on AWS EC2.
Served via Nginx on port 80 β€” confirming successful cloud deployment.


πŸ”Ή 2. Tutorial Details & Update Operations

Tutorial Details & Edit

Full CRUD in action: update, publish, delete.
All actions hit REST APIs (Node.js/Express) with data persisted in MongoDB (Dockerized).


πŸ”Ή 3. Add Tutorial – Create Operation

Add Tutorial

Create flow from Angular β†’ Backend β†’ MongoDB, validating end‑to‑end cloud integration.


πŸ”Ή 4. Docker Images in Docker Hub

Docker Hub

Docker images for frontend and backend in Docker Hub β€” built and pushed automatically via GitHub Actions.


πŸ”Ή 5. Running Containers on AWS EC2

EC2 Containers

All services (frontend, backend, MongoDB) running on AWS EC2 via Docker Compose.


πŸ”Ή 6. GitHub Actions CI/CD Workflow

GitHub Actions

Automated CI/CD pipeline execution: image build β†’ push β†’ deploy to cloud infra.


πŸ”Ή 7. Successful Deployment Logs

Deployment Logs

Successful automated deployment: remote container updates and service restarts on EC2.


πŸ”Ή 8. Nginx Reverse Proxy Configuration

Nginx Reverse Proxy

Served through Nginx reverse proxy on port 80.
Internal container ports hidden for production-style security and ergonomics.

πŸ“Š Why This Approach

This project demonstrates a production-ready DevOps workflow:

  • Scalable architecture
  • Automated deployment
  • Containerized services
  • Cloud-ready
  • High availability

This approach ensures: βœ” Faster deployment βœ” Reduced manual errors βœ” Improved scalability βœ” Easy maintenance


πŸš€ What’s Next

  • HTTPS with SSL (Let’s Encrypt / ACM)
  • Custom domain + DNS
  • Kubernetes (EKS/K3s) deployment
  • Monitoring with Prometheus & Grafana
  • Load balancing (ALB/Nginx)
  • Blue‑Green/Canary deployments
  • IaC with Terraform or Pulumi

πŸ‘¨β€πŸ’» About Me

Hi, I’m P M β€” DevOps | Full‑Stack | Cloud | Automation.
I built this project to showcase real‑world DevOps skills across build, ship, and run.


πŸ“¬ Contact

Let’s connect for collaboration or opportunities! βœ‰οΈ


⭐ If you found this useful, consider leaving a star β€” it helps recruiters discover it! ✨

β€”

Made with ❀️ for learning, reliability, and speed.

About

Production-ready DevOps project demonstrating containerized deployment of a full-stack MEAN application with CI/CD automation, Docker, Nginx reverse proxy, and AWS EC2 infrastructure.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors