mirror of
https://github.com/Balshgit/gpt_chat_bot.git
synced 2025-09-10 17:20:41 +03:00
24 lines
505 B
Bash
24 lines
505 B
Bash
#! /bin/bash
|
|
|
|
set -e
|
|
|
|
alembic upgrade "head" && \
|
|
python3 core/bot/managment/update_gpt_models.py
|
|
|
|
echo "starting the bot"
|
|
|
|
if [[ "${START_WITH_WEBHOOK}" == "true" ]]
|
|
then
|
|
echo "Starting bot in webhook mode..."
|
|
gunicorn main:create_app \
|
|
--workers ${WORKERS_COUNT} \
|
|
--bind ${APP_HOST}:${APP_PORT} \
|
|
--worker-class uvicorn.workers.UvicornWorker \
|
|
--timeout 150 \
|
|
--max-requests 2000 \
|
|
--max-requests-jitter 400
|
|
else
|
|
echo "Starting bot in polling mode..."
|
|
python main.py
|
|
fi
|