gpt_chat_bot/scripts/start-bot.sh
2023-05-01 02:37:14 +03:00

18 lines
389 B
Bash

#! /bin/bash
echo "starting the bot"
if [[ "${START_WITH_WEBHOOK}" == "true" ]]
then
echo "Starting bot in webhook mode..."
gunicorn main:create_app \
--bind ${WEBAPP_HOST}:${WEBAPP_PORT} \
--worker-class aiohttp.GunicornWebWorker \
--timeout 150 \
--max-requests 2000 \
--max-requests-jitter 400
else
echo "Starting bot in polling mode..."
python main.py
fi