freeleaps-authentication/start_fastapi.sh

27 lines
554 B
Bash
Raw Normal View History

2025-10-30 03:26:05 +00:00
#! /bin/bash
rp=$(dirname "$(realpath '$1'))")
pushd $rp
APP_NAME=authentication
VENV_DIR=venv
. .env
if [ -d "$VENV_DIR" ]
then
echo "Folder $VENV_DIR exists. Proceed to next steps"
else
echo "Folder $VENV_DIR dosen't exist. create it"
sudo apt install python3-pip
python3 -m pip install virtualenv
python3 -m virtualenv $VENV_DIR
fi
source $VENV_DIR/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
set -a; source local.env; set +a
uvicorn webapi.main:app --reload --host 0.0.0.0 --port $SERVER_PORT
popd