A end-to-end DevOps project built using Flask, Docker, Nginx, GitHub Actions CI/CD, and AWS EC2.
This project demonstrates a complete DevOps workflow starting from local development to cloud deployment.
The application is containerized using Docker, managed using Docker Compose, reverse proxied through Nginx, tested using GitHub Actions CI pipeline, and deployed on AWS EC2.
- Python Flask
- Docker
- Docker Compose
- Nginx
- GitHub Actions
- AWS EC2
- Ubuntu Linux
- MySQL
Client → Nginx → Flask App → MySQL Database
- Flask backend API
- MySQL database integration
- Dockerized application
- Multi-container setup using Docker Compose
- Nginx reverse proxy configuration
- CI pipeline using GitHub Actions
- AWS EC2 deployment
- Public IP accessibility
.
├── .github/workflows
│ └── ci.yml
├── nginx
│ └── nginx.conf
├── screenshots
│ ├── docker-containers.png
│ ├── ec2-ssh.png
│ ├── github-actions-success.png
│ ├── project-structure.png
│ └── public-deployment.png
├── app.py
├── docker-compose.yml
├── Dockerfile
├── requirements.txt
└── README.mdgit clone https://github.com/hrshtmlng/flask-devops-app.git
cd flask-devops-appdocker compose up --builddocker compose up -ddocker pshttp://localhost
http://YOUR_PUBLIC_IP
Handles:
- API logic
- Backend application
- Database connection
Handles:
- Database storage
- Persistent data
Handles:
- Reverse proxy
- Traffic forwarding
- Port exposure
GitHub Actions automatically:
- Builds Docker containers
- Verifies Docker Compose setup
- Runs on every push to main branch
Workflow file location:
.github/workflows/ci.yml
- Created AWS EC2 Ubuntu instance
- Connected using SSH and PEM key
- Installed Docker and Docker Compose
- Cloned GitHub repository
- Ran containers using Docker Compose
- Exposed application using public IP
docker compose up -ddocker compose downdocker compose logsdocker psssh -i your-key.pem ubuntu@YOUR_PUBLIC_IPShows successful CI pipeline execution after pushing code to GitHub.
Connected to AWS EC2 Ubuntu instance using PEM key.
All Docker containers running successfully using Docker Compose.
Application successfully deployed and accessible using EC2 public IP.
Project folder structure inside VS Code.
Through this project I learned:
- Docker containerization
- Multi-container orchestration
- Reverse proxy configuration
- CI/CD basics
- AWS EC2 deployment
- Linux server management
- Git and GitHub workflow
- Cloud deployment basics
- Kubernetes deployment
- Terraform infrastructure automation
- Monitoring using Prometheus and Grafana
- HTTPS with SSL certificates
- Automated production deployment pipeline
Harshit Malang




