This project is a minimal FastAPI app, Dockerized and ready to be used as a base for your next project, or as a guide to Dockerize your existing FastAPI app.
It wires up a lot of real-world components without overloading the project with too many personal preferences.
β‘ Stack:
- FastAPI 0.111.0
- Python 3.13.2
- Tech Stack
- Running the App
- Development Commands
- Managing Dependencies
- Front-end Choices
- Notable Opinions and Extensions
- Additional Resources
- About the Author
git clone https://github.com/your-username/your-repo.git hellofastapi
cd hellofastapidocker compose up --buildNote:
- First build will take 5β10 minutes.
- Ensure Docker Compose v2.20.2+.
- Change
DOCKER_WEB_PORT_FORWARDin.envif port 8000 is in use. - Adjust
UIDandGIDif permission errors on Linux.
In another terminal:
./run fastapi db reset --with-testdbhttp://localhost:8000
./run lint./run format./run test./run quality- List outdated:
./run uv:outdated
./run yarn:outdated- Install new packages:
- Edit
pyproject.tomlorassets/package.json. - Run:
./run deps:install- CLI Add:
./run uv add mypackage --no-sync
./run yarn add mypackage --no-lockfile- Then install:
./run deps:installChoose any depending on your app:
| Feature | Details |
|---|---|
| App Server | uvicorn |
| ORM | SQLAlchemy |
| Migrations | Alembic |
| Linting | ruff |
| Testing | pytest + pytest-cov |
| Routing | / page and /up health check routes |
| Config Management | .env + config/settings.py |
| Docker | Full multi-stage builds |
| CI | GitHub Actions setup |
| Package Manager | uv |
| Assets | TailwindCSS, esbuild, Heroicons |
Thanks for checking out this project. Feel free to fork, clone, or suggest improvements!