Skip to content

Latest commit

 

History

History
75 lines (54 loc) · 1.33 KB

README.md

File metadata and controls

75 lines (54 loc) · 1.33 KB

YAFT - Yet Another FastAPI Template

Setup

Prerequisites

Setup

poetry install
npm i

Env variables:

.env

AUTH0_DOMAIN=...
AUTH0_CLIENT_ID=...
AUTH0_CLIENT_SECRET=...
DATABASE_URL=...
DATABASE_URL_PROD=...
ENV=dev

Database Management

Whenever you change the schema, run the following commands to migrate the databse. Be sure your env variables are set.

just revision $env # where $env is dev or prod
# THIS
just upgrade $env
# OR
just upgrade-all

Launching the server and css env (needs two terminals)

just css
just post && just run

Going to Production

just up

References

Misc Commands

poetry run alembic init alembic
poetry run python -m unittest

Educational Resources

For providing CLI arguments to alembic: https://gist.github.com/twolfson/4bc5813b022178bd7034