- Start docker containers
docker-compose -f local.yml up docker-compose -f local.yml up --build # build containers again docker-compose -f local.yml up -d # run in background
- Connect to
app
containerdocker-compose -f local.yml exec app /bin/bash
- Run migrations using
alembic
Notice that you should havealembic upgrade head
alembic
folder with migrations. If you don't have it:- Init alembic folder
alembic init alembic
- And change
sqlalchemy.url
inalembic.ini
file or configure it inenv.py
- Create you first migration
alembic revision --autogenerate -m "First migration"
- And then you can
alembic upgrade head
- Init alembic folder
- Create initial data. Generally, it creates superuser for testing. You can configure it in
task_fast_api/.env
file. - Run tests using
pytest
pytest -s
- Go to
/docs/
to try all endpoint by himself. - Go to
/redoc/
to check Documentation for each endpoint