Skip to content

Latest commit

 

History

81 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Flask - Demo Web Application

This is a simple Python Flask web application. The app provides system information and a realtime monitoring screen with dials showing CPU, memory, IO and process information.

The app has been designed with cloud native demos & containers in mind, in order to provide a real working application for deployment, something more than "hello-world" but with the minimum of pre-reqs. It is not intended as a complete example of a fully functioning architecture or complex software design.

Typical uses would be deployment to Kubernetes, demos of Docker, CI/CD (build pipelines are provided), deployment to cloud (Azure) monitoring, auto-scaling

Screenshot

screen

Locally via Python

Python 3.6+ is required and has been tested on Windows and Linux (Ubuntu 18.04)

Simply run with python run.py the script should start the app, and set Flask listening on port 5000, you can change the port with the environmental variable PORT.
Go to http://localhost:5000 to view the app.

Running as Docker Container

The image is publicly available on GitHub Container Registry so running it in Docker is simple docker run --rm -it -p 5000:5000 ghcr.io/benc-uk/python-demoapp

The container runs on Debian Linux and is configured to use the latest version of Python (3.6.2 at the time of writing)

GitHub Actions CI/CD

A working set of CI and CD release GitHub Actions workflows are provided .github/workflows/, automated builds are run in GitHub hosted runners

Running in Azure App Service (Linux)

If you want to deploy to an Azure Web App as a container (aka Linux Web App), a Bicep template is provided in the infrastructure as code directory

You can also very quickly deploy to Azure App Service directly with the Azure CLI and az webapp up. Note. <app-name> must be globally unique. Change the sku to a larger size, e.g. P1V2 for a much faster deployment

az webapp up --sku F1 --name <app-name>

Running in Azure App Service (Windows)

Just don't, it's awful

About

Python Flask web application designed for running in containers for demos

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages