This repository is a basic scaffold for a containerized app. It makes use of environment variables for configuration and is meant as part of a Kubernetes kickstart.
The following environment variables are used:
VERSION
- shown as-isSTAGE
- if eitherdev
,int
orprod
, loads a corresponding stylesheetPORT
- used by gunicorn, which binds to this port
Furthermore, the whole env is visible in the app.
cd app
python -m venv .venv # do this in a virtual environment to isolate dependencies
source .venv/bin/activate # actually use the new environment in this shell
pip install -r requirements.txt # install dependencies
You can run this either with flask directly:
cd app
flask --app app run
or using gunicorn as aWSGI server:
cd app
./serve.sh
TAG=chtime/via:latest
podman build -t $TAG .
You can directly import this via the OpenShift console into a cluster. More details are in resources.