[go: up one dir, main page]

Skip to content

A small http-micro-server for test purpose

Notifications You must be signed in to change notification settings

irish1986/http-micro-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

http-micro-server

A simple http server simulating a micro-serverice architecture from scratch.

Getting Started

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.

Run the local server

task python:source
which python3
python3 app/main.py
curl -i http://localhost:8080/hello

Build container locally

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 GB
  • docker.io/python:3.11.6-slim-bookworm ~129MB
  • gcr.io/distroless/python3-debian12 ~58MB
  • Multi-stage (will get into these details later)

Distroless is really the king here !

task docker:build

About

A small http-micro-server for test purpose

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Packages