A simple http server simulating a micro-serverice architecture from scratch.
This is a simple web server return code 200 written in Python. The idea is to show how things scales from here toward a micro-services archtecture. Also wile at it, I am trying to leverage as much as possible best practices.
task python:source
which python3
python3 app/main.py
curl -i http://localhost:8080/hello
Once the server works successfully, we can build it locally. Using docker.io/python:3.11.6
carries the burden of a large files size (~1GB for this little http server that does nothing significant).
The solution is to move to other options:
docker.io/python:3.11.6
~1 GBdocker.io/python:3.11.6-slim-bookworm
~129MBgcr.io/distroless/python3-debian12
~58MB- Multi-stage (will get into these details later)
Distroless is really the king here !
task docker:build