
Building a CI/CD Pipeline with Docker, Jenkins, and AWS EC2
Introduction: In modern DevOps workflows, Continuous Integration and Continuous Deployment (CI/CD) pipelines help teams deliver software faster and more reliably. In this project, I built a complete CI/CD pipeline that automatically deploys a Dockerized Python application to an AWS EC2 instance using Jenkins. The goal was to simulate a real-world deployment pipeline where code changes trigger automatic builds, tests, and deployments. Architecture Overview: The pipeline works as follows: Developer → GitHub → Jenkins Pipeline → Docker Build → DockerHub → AWS EC2 → Nginx Reverse Proxy → Application Containers Application Setup: We will be using a simple Python Flask application that returns the message 'Hello from CI/CD auto-deploy!', along with a requirements.txt file for managing dependencies and a test_app.py file for running test cases. app.py: from flask import Flask , jsonify import socket import os app = Flask ( __name__ ) @app.get ( " /health " ) def health (): return jsonify ( st
Continue reading on Dev.to
Opens in a new tab



