This project demonstrates a complete CI/CD pipeline for deploying a Python Flask application using Jenkins, Docker, Nginx, and AWS EC2.
The pipeline automates the process of:
- Pulling code from GitHub
- Building a Docker image
- Running the application inside a Docker container
- Exposing the application through Nginx reverse proxy
This simulates a real-world DevOps deployment workflow.
- AWS EC2
- Jenkins
- Docker
- Nginx
- GitHub
- Python Flask
Developer → GitHub → Jenkins → Docker → Nginx → User
- Developer pushes code to GitHub
- Jenkins pulls the latest code
- Jenkins builds Docker image
- Docker container runs the Flask application
- Nginx forwards requests from port 80 → 5000
- Users access the application through EC2 Public IP
devops-project
│
├── app.py
├── Dockerfile
├── Jenkinsfile
├── docker-compose.yml
├── requirements.txt
└── README.md
The Jenkins pipeline performs the following steps:
1️⃣ Clone repository from GitHub
2️⃣ Build Docker image
3️⃣ Run Docker container
Example commands executed in pipeline:
docker build -t flask-app .
docker run -d -p 5000:5000 flask-app
Docker is used to containerize the Flask application so it can run consistently across environments.
Docker builds an image using the Dockerfile and runs the container exposing port 5000.
Nginx is used as a reverse proxy.
It forwards traffic from:
http://EC2-IP
to
http://localhost:5000
This allows users to access the application without specifying the port number.
Once deployed, the application can be accessed through:
http://EC2-PUBLIC-IP
Example output:
Hello Ansiya DevOps Project 🚀
Through this project I learned:
- Building CI/CD pipelines using Jenkins
- Containerizing applications with Docker
- Configuring Nginx as a reverse proxy
- Deploying applications on AWS EC2
- Automating build and deployment workflows
Ansiya Fassil
BTech Computer Science and Engineering
DevOps Enthusiast
GitHub:
https://github.com/Ansiyafassil


