create python venv when needed

This commit is contained in:
arne 2023-02-03 20:48:23 +01:00
parent 4921403842
commit 204147d01a
2 changed files with 6 additions and 2 deletions

2
app.py
View File

@ -8,7 +8,7 @@ vars = {}
logging.basicConfig(
format="%(asctime)s %(message)s",
level=logging.INFO,
level=logging.INFO
)
async def handshake(ws,data):

View File

@ -3,7 +3,11 @@
BASE=$(dirname $0)
cd $BASE
git pull
python3 -m venv env
if [ -d env ];
then
python3 -m venv env
fi
source env/bin/activate
pip3 install -U -r requirements.txt
exec python3 app.py