How palash2198/two-tier-flask-app works
Project type and purpose
• This is a two-tier full-stack web application built with Flask (Python) on the backend and MySQL as the datastore.
• It supports two deployment modes:
a. Local development using Docker Compose
b. Production-style deployment onto an AWS EKS (Kubernetes) cluster via the manifests in eks-manifests/ or k8s/.
• A Jenkinsfile is included, indicating a CI/CD pipeline to build and push container images, then deploy to Kubernetes.
File structure
• Top level:
• Dockerfile & Dockerfile-multistage – container image definitions for the Flask app
• docker-compose.yml – local two-tier orchestration
• Jenkinsfile & Makefile – CI/CD automation and build scripts
• app.py & templates/index.html – Flask application code and frontend template
• requirements.txt – Python dependencies
• eks-manifests/ & k8s/ – Kubernetes deployment manifests (ConfigMaps, Secrets, Deployments, Services, PV/PVC definitions)
• message.sql – example SQL statement to initialize the messages table
• Patterns: two-tier (web + database), containerization, configuration-as-code (K8s YAMLs), CI/CD integration.
README for insights
• Confirms two deployment workflows and environment variable setup
• Describes runtime endpoints:
• Frontend at http://localhost (serving index.html via Flask)
• Backend API at http://localhost:5000 (e.g., /insert_sql)
• Emphasizes need for a messages table in MySQL
• Points out manual vs. automated (Docker Compose vs. network-based Docker run) launches