Giter Site home page Giter Site logo

binlabnet / python-demoapp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from benc-uk/python-demoapp

0.0 1.0 0.0 338 KB

Simple Python Flask web application designed for running in containers for demos

License: MIT License

Dockerfile 0.90% Python 9.38% CSS 1.95% JavaScript 70.85% HTML 16.92%

python-demoapp's Introduction

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 Dockerhub here so running it in Docker is simple docker run -d -p 5000:5000 bencuk/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)

If you want to deploy to an Azure Container Instance, a working template & quick deploy button is provided in the azure deploy directory

GitHub Actions CI/CD

A working CI and release GitHub Actions workflow is provided .github/workflows/build-deploy-aks.yml, automated builds are run in GitHub hosted runners

GitHub Actions


Running in Azure App Service (Linux)

If you want to deploy to an Azure Web App for Containers (aka Linux Web App), a template is provided in the azure deploy directory

Running in Azure App Service (Windows)

Just don't

python-demoapp's People

Contributors

benc-uk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.