/message-in-a-flask

docker image with flask application, used for checking environment variables, ports, connection to databases, ip addresses, etc, in a kubernetes/openshift clusters.

Primary LanguageCSS

Message in a Flask!

Message in a Flask is a docker image which show environment information and environment variables.

Current features

  • It can show you the local Hostname and local IP address of the container.

Planned features

  • Show SQL connection, hostname, port, identity and simple query
  • Show SaaS and PaaS services available

Docker CI/CD commands

Terminal:

git clone https://github.com/oscillate123/message-in-a-flask.git
docker build --rm -t mia:latest ./message-in-a-flask
docker image prune -f
docker run --name mia -d --rm -it -p 5000:5000 thlab/mia:latest

or in a bash script:

cat >> build_and_run.sh
#!/bin/bash
docker kill mia #kill existing container if any
docker build --rm -t thlab/mia:latest /path/to/message-in-a-flask #
docker image prune -f
docker run --name mia -d --rm -it -p 5000:5000 thlab/mia:latest

then run bash /path/to/build_and_run.sh everytime you change the code

Flask variables and commands

  • export FLASK_APP=flask-app
  • export FLASK_ENV=development
  • export FLASK_DEBUG=1
  • flask run --host=0.0.0.0

Sources:

Flask documentation

Python documentation

Flask example project

Flask usefull links

Docker related links