{"id":18086402,"url":"https://github.com/mdazfar2/two-tier-flask-app","last_synced_at":"2026-05-06T01:35:31.860Z","repository":{"id":227542322,"uuid":"771716299","full_name":"mdazfar2/two-tier-flask-app","owner":"mdazfar2","description":"This project aims to deploy a scalable two-tier application running on Flask and MySQL, designed to handle 10,000 concurrent users while adhering to best DevOps practices. By leveraging Docker, Kubernetes, and AWS services, We ensure fault tolerance, scalability, and efficient deployment.","archived":false,"fork":false,"pushed_at":"2024-03-22T10:55:38.000Z","size":98,"stargazers_count":0,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T00:43:53.441Z","etag":null,"topics":["aws-eks","docker","docker-compose","helm","kubernetes"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdazfar2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-13T20:16:39.000Z","updated_at":"2024-03-18T13:28:54.000Z","dependencies_parsed_at":"2024-03-22T11:39:30.181Z","dependency_job_id":null,"html_url":"https://github.com/mdazfar2/two-tier-flask-app","commit_stats":null,"previous_names":["mdazfar2/two-tier-flask-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mdazfar2/two-tier-flask-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdazfar2%2Ftwo-tier-flask-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdazfar2%2Ftwo-tier-flask-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdazfar2%2Ftwo-tier-flask-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdazfar2%2Ftwo-tier-flask-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdazfar2","download_url":"https://codeload.github.com/mdazfar2/two-tier-flask-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdazfar2%2Ftwo-tier-flask-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010471,"owners_count":26084756,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws-eks","docker","docker-compose","helm","kubernetes"],"created_at":"2024-10-31T16:07:50.891Z","updated_at":"2025-10-12T06:05:47.204Z","avatar_url":"https://github.com/mdazfar2.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Two Tier Flask App\n\n\n\u003c!-- - ------------------------------------------------------------------------------------------------------------------------------------------------------ --\u003e\n\u003c!--- -- Tutorial video project ---------------------------------------------------------------------------------------------------------------------------- --\u003e\n\u003c!--- ------------------------------------------------------------------------------------------------------------------------------------------------------ --\u003e\n\nhttps://github.com/mdazfar2/two-tier-flask-app/assets/100375390/e54169da-ecba-4ea4-b75b-e75eaca5318a\n\n## Overview- \nThis project aims to deploy a scalable two-tier application running on Flask and MySQL, designed to handle 10,000 concurrent users while adhering to best DevOps practices. By leveraging Docker, Kubernetes, and AWS services, we ensure fault tolerance, scalability, and efficient deployment.\n\n## Features\n- **Scalability**: Designed to handle 10,000 concurrent users.\n \n- **Fault Tolerance**: Utilizes Kubernetes on EKS for fault tolerance.\n\n- **Containerization**: Dockerized application for portability and consistency.\n\n- **Automated Deployment**: Automated Kubernetes cluster setup using HELM.\n\n- **Continuous Integration/Continuous Deployment (CI/CD)**: Implemented DockerHub repository for versioning and continuous deployment.\n\n- **Improved Downtime**: Reduced downtime by 60% with AWS Managed EKS.\n\n\n# Step by Step guide for making this project-\n\n1. **Execute the commands one by one, this is for Ubuntu**\n\n    ```bash\n    sudo apt install\n    ```\n\n   ```bash\n   sudo apt update\n   ```\n\n   ```bash\n   sudo apt install docker.io\n   ```\n\n   ```bash\n   sudo chown $USER /var/run/docker.sock\n   ```\n\n   ```bash\n   docker ps\n   ```\n\n2. **Now, execute below commands one by one**\n\n   ```bash\n   git clone https://github.com/mdazfar2/two-tier-flask-app.git\n   ```\n\n   ```bash\n   cd two-tier-flask-app\n   ```\n\n   ```bash\n   docker build . -t flaskapp\n   ```\n\n   ```bash\n   docker images\n   ```\n\n   ```bash\n   docker network create twotier\n   ```\n\n   ```bash\n   docker run -d -p 5000:5000 --network=twotier -e MYSQL_HOST=mysql -e MYSQL_USER=admin -e MYSQL_PASSWORD=admin -e MYSQL_DB=myDB --name=flaskapp flaskapp:latest\n   ```\n\n   ```bash\n   docker run -d -p 3306:3306 --network=twotier -e MYSQL_DATABASE=myDB -e MYSQL_USER=admin -e MYSQL_PASSWORD=admin -e MYSQL_ROOT_PASSWORD=admin --name=mysql mysql:5.7\n   ```\n\n3. **Now use the Ip and add the port to :5000**\n\n4. **Then execute the command for MYSQL-**\n\n   ```bash\n   docker exec -it 634c54ae7bbb bash\n   ```\n\u003e [!NOTE]\n\u003e Instead of 634c54ae7bbb use the `container Id` of MYSQL.\n\n   ```bash\n   mysql -u root -p\n   ```\n\u003e [!NOTE]\n\u003e After run the up command then, Put the password `admin`.\n\n  ```bash\n  show databases;\n  ```\n\n  ```bash\n  use myDB\n  ```\n\n  ```sql\n  CREATE TABLE messages (\n         id INT AUTO_INCREMENT PRIMARY KEY,\n         message TEXT\n  ```\n\n5. **Show your messages in you MYSQL Database**\n\n   ```bash\n   select * from messages;\n   ```\n\n6. **If you want to delete all the history from your database**\n\n   ```bash\n   DELETE FROM messages;\n   ```\n\n***This is all that I deployed two tier flask app using dockerising . If you stuck during making this project, feel free to ask anything. I love to help you. You can contact me on [LinkedIn](https://linkedin.com/in/md-azfar-alam), [Instagram](https://www.instagram.com/azfarxx_/) or [Discord](https://discord.com/users/877531143610708028)***\n\n\n## Keep Learning \u0026 Sharing.. ✨\n   \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdazfar2%2Ftwo-tier-flask-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdazfar2%2Ftwo-tier-flask-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdazfar2%2Ftwo-tier-flask-app/lists"}