- Create a virtual environment
python -m venv venv
- Activate the virtual environment
MacOS/Linux:
source venv/bin/activate
Windows:
venv\Scripts\activate
- Install requirements
pip install -r requirements.txt
- Run the server (for development only)
uvicorn app.main:app --reload
or
python3 server.py
- Update database using
alembic revision --autogenerate -m "Commit message"
then
alembic upgrade head
pytest -v -s
- Build
docker build -t ttl-backend .
- Run
docker run --env-file .env -p 8000:8000 ttl-backend
nohup ./run.sh &