This repo shows how to work with a small Python flask application that displays and serves static web files.
Besides, it shows how to make above app work inside a docker image for enabling deployment to any platform.
- Our platform of choice - MacOS
- Prerequisites:
- python 3
- docker
- VC (optional)
cat requirements.txt
python3 -m venv venv
venv/bin/pip install -r requirements.txt
cat app.py
venv/bin/python app.py
- Check created web endpoints.
- Follow best practicies while writing a Dockerfile
docker build . -t my-python-server
docker run --rm --name flask-app -p 5000:5000 my-python-server