MERN Stack Deployment Pipeline
Automated container deployment with security scanning and quality checks using Gitlab CI

Project Overview
Designed and implemented a comprehensive deployment pipeline for a MERN (MongoDB, Express, React, Node.js) stack application, leveraging Docker for containerization and GitLab CI/CD for automation. The solution incorporates security scanning, quality gates, and artifact management to ensure reliable deployments.
Core Components
Containerization
Packaged the application components (frontend, backend, database) as isolated Docker containers with proper networking and persistent storage for the database.
Security Scanning
Integrated Trivy for vulnerability scanning at both the filesystem and container image levels, with detailed reporting.
Quality Gates
Implemented SonarQube analysis to enforce code quality standards before deployment.
Automated Pipeline
Configured a 5-stage GitLab CI/CD workflow with parallel execution where possible.
Implementation Details
Container Architecture
The solution uses Docker Compose to manage three main services:
- Frontend: React application served on port 5173
- Backend: Node.js/Express API on port 5050
- Database: MongoDB with persistent volume storage
Pipeline Stages
- Build: Installs dependencies and prepares artifacts
- Security Scan: Runs Trivy and SonarQube analysis
- Docker Build: Creates container images with pipeline IDs
- Image Scan: Checks built images for vulnerabilities
- Deployment: Pushes approved images to registry
Key Features
- Artifact passing between pipeline stages
- Parallel execution of frontend/backend jobs
- Multiple GitLab runners for efficient resource use
- Security gates to prevent vulnerable deployments
Key Achievements
- Designed and implemented a production-ready backend API
- Implemented secure JWT authentication system
- Created comprehensive CRUD operations for posts
- Developed interactive voting system
- Containerized application with Docker and Docker Compose
- Configured PostgreSQL with proper persistence
- Followed best practices for FastAPI development
Work Samples

GitLab CI images
7 images