Very minimum dockerized FastAPI. This is useful when you create a single endpoint API etc..
This repository contains very minimum tool-kit to run FastAPI based API service. It contains the following features.
- Fast API based API server (src/main.py)
- Status and docs endpoints (src/endpoints)
- Logger (src/utils/init.py)
- Error handler (src/utils/custom_error_handlers.py)
- Config loader (src/utils/config_loader.py)
- Dockerfile
pip install -r requirements.txt
pytho src/main.py
docker build -t lightning_fast_api_image . && docker run -p 80:80 -d --name lightning_fast_api lightning_fast_api_image
If you managed to run the application, you should be able to access to localhost:80
and see the Swagger documentation like this.