Skip to content

A Fastapi boilerplate setup for postgresql, alembic and docker with user authentication

License

Notifications You must be signed in to change notification settings

thiere18/fastapi-boilerplate

Repository files navigation

fastapi-boilerplate

A Fastapi boilerplate for backend dev

Configuration for local development

  1. create virtual environment python3 -m venv venv
  2. activate the environment source ${pwd}/venv/bin/activate
  3. create .env file and copy .env-example on it
  4. intall dependencies pip install -r requirements.txt
  5. run migration alembic upgrade head
  6. start the server with uvicorn uvicorn app.main:app --reload

conf for docker environment

1.modify variables on docker-compose.yml then run docker-compose up

Happy debugging :)

important

for those who don't like to deal with alembic you can add this line to the main.py file: models.Base.metadata.create_all(bind=engine) just after the app instance

Releases

No releases published

Packages

No packages published