- Install Poetry
- Run
poetry install
in the project root - Run
poetry shell
to activate the virtual environment (also creates a sub-shell) - Run
uvnicorn main:app --reload
to start the local server - If the command was successful, http://127.0.0.1:8000/docs should show a Swagger/OpenAPI docs page
- The
gunicorn.conf.py
file is from this tutorial. - Startup command is
gunicorn main:app
How to export requirements.txt (if needed for build step)
poetry export --without-hashes --format=requirements.txt > requirements.txt
