dth-pingpong-backend/start.sh

22 lines
334 B
Bash

#!/bin/bash
ver="3.11"
py="python$ver"
if ! command -v $py &> /dev/null
then
echo "$py not found"
exit
fi
if [ -d .venv/ ]
then
source .venv/bin/activate
else
$py -m venv .venv
source .venv/bin/activate
$py -m pip install -U -r requirements.txt
fi
exec uvicorn main:app --reload --host 0.0.0.0 --port 9134