This repository contains a sample Python app using the Flask
library. Testing uses the PyTest library.
The app binds to port 80
on all IPs.
- Make sure you have
virtualenv
installed. - Create a new
virtualenv
environment. - Run
pip install -r requirements.txt
. - Test the app with
pytest src/
. - Run the application with
python ./src/app.py
. - To build the container locally, run
docker build -t richardboydii/xyz-demo-app:latest
. - To launch the container, run
docker run -p 0.0.0.0:80:80 richardboydii/xyz-demo-app:latest
.
The app uses Terraform to create a Kubernetes Deployment on the cluster provisioned in xyz-infrastructure. GitHub Actions runs the job anytime a push or merge is made to main or staging. It deploys 2 replicas by default backed by a Classic Load Balancer.