The backend infrastructure for Whale
We use Poetry for dependency management.
# Install Poetry
curl -sSL https://install.python-poetry.org | python3 -
Or follow installation instructions from Poetry website.
It is recommended to use Python virtual environment, so you don't pollute your system Python environment.
# Install dependencies
poetry install
# Update/upgrade dependencies
poetry update
# Activate Python virtual environment
poetry shell
Copy an existing environment template file and fill in all the necessary values:
# Create .env file (by copying from .env.example)
cp .env.example .env
uvicorn app.main:app --reload --host 0.0.0.0 --port 8080
uvicorn app.main:app --reload --host 0.0.0.0 --port 8080 --ssl-keyfile ~/backend/privkey.pem --ssl-certfile ~/backend/fullchain.pem
Run the following command at the root of the repository
black .