Dockerized FastAPI boiler plate similar to Django code structure with views, serializers(pydantic) and model( Sqlalchemy ORM) with dockerized database(PostgresSQL) and PgAdmin. 🚀
✅ Production ready with one docker-compose command.
✅ Similar to Django Code Structure.
✅ Local dockerized db.
✅ Dockerized PgAdmin to check the db records.
✅ Migrations, Serializers and ORM configured.
✅ CRUD APIs (Sneaker App).
✅ Token Authentication.
✅ Logging Mechanism.
✅ Testcases TDD with Pytest.
✅ Seperate Database(Sqlite) and mock session configured for test cases.
✅ Poetry dependency management and packaging made easy. (Better than pip)
Make sure you have docker and docker-compose installed docker installation guide
create .env file in root folder fastapi-boilerplate/.env
DATABASE_URL=postgresql+psycopg://postgres:password@db:5432/boiler_plate_db
DB_USER=postgres
DB_PASSWORD=password
DB_NAME=boiler_plate_db
[email protected]
PGADMIN_PASSWORD=admin
X_TOKEN=12345678910
docker-compose up
localhost:8000
Swagger docs on localhost:8000/docs
GET request example
localhost:5050