- Copy from git
cd py git clone https://github.com/obshee-delo-ru/od_pro_support_bot.git
- Create virtual env on hosting: timeweb
- Create virtual env Linux
cd py python3 -m venv env pip install -r req.txt
- Create virtual env Windows
cd py python -m venv env pip install -r req.txt
Startup
python3 bot.py
Linux startup with resistant to terminal closure (like ssh disconnect)
through nohup (resistent to input/output closure as well):
cd py
wget https://raw.githubusercontent.com/Obshee-Delo-IT/od_pro_support_bot/main/bot.py
source venv/bin/activate
pip install pyTelegramBotAPI==4.14.0
nohup python3 bot.py > od-pro-bot.out 2>&1 &
through disown:
env/Scripts/python bot.py & disown %1
#(jobs -l to check a worker not in session)
#ps aux to check worker