This project demonstrates an Automated Rollback Mechanism for failed deployments in a DevOps CI/CD pipeline using GitHub Actions and Docker.
The system automatically detects deployment failures through health checks and restores the last stable version of the application without manual intervention. This helps improve reliability, reduce downtime, and ensure continuous application availability.
Analyze and create an Automated Rollback Mechanism for failed deployments in DevOps pipelines.
Frequent deployments can introduce failures due to bugs, configuration issues, or runtime errors. Recovering manually from such failures increases downtime and operational effort. This project addresses the problem by implementing a fully automated rollback workflow.
| Technology | Purpose |
|---|---|
| GitHub Actions | CI/CD Pipeline Automation |
| Docker | Application Containerization |
| Docker Compose | Container Deployment |
| Node.js | Backend Runtime |
| Express.js | Web Application Framework |
| Git & GitHub | Version Control |
| Curl | Health Check Validation |
Developer Pushes Code
│
▼
GitHub Repository
│
▼
GitHub Actions Pipeline
│
▼
Build Docker Image
│
▼
Deploy Application
│
▼
Health Check
│
┌────┴────┐
│ │
Success Failure
│ │
▼ ▼
Stable Rollback
Version Triggered
│ │
└────┬────┘
▼
Application Running
Whenever code is pushed to the main branch, GitHub Actions automatically starts the workflow.
docker build -t rollback-app:latest .docker compose up -dcurl http://localhost:3000curl http://localhost:3000/crashThis intentionally crashes the application to test rollback functionality.
If the health check fails:
- Failed container is stopped
- Stable version is restored
- Application is redeployed automatically
Version 1 - App is Working
Version 1 - App is Working
curl: (52) Empty reply from server
Rollback triggered...
Version 1 - App is Working
- Automated CI/CD Pipeline
- Docker-based Deployment
- Health Check Validation
- Failure Detection
- Automatic Rollback
- Zero Manual Recovery
- GitHub Actions Integration
✅ Reduced Downtime
✅ Improved Reliability
✅ Faster Recovery
✅ Automated Deployment Validation
✅ Real-World DevOps Practice
Through this project, the following concepts were implemented and understood:
- CI/CD Pipeline Design
- GitHub Actions Workflow Automation
- Docker Containerization
- Health Check Monitoring
- Deployment Failure Handling
- Rollback Strategies
- DevOps Best Practices
- Docker Hub Integration
- AWS Deployment
- Kubernetes Support
- Blue-Green Deployment
- Canary Deployment
- Monitoring with Prometheus & Grafana
ES Sriram
B.Tech – Computer Science & Engineering (Cloud Computing)
Alliance University, Bengaluru
⭐ If you found this project useful, consider starring the repository.
