gpt_chat_bot/scripts/start-bot.sh
Dmitry Afanasyev 23031b0777
add database and migration logic (#27)
* update chat_microservice

* reformat logger_conf

* add database

* add service and repository logic

* fix constants gpt base url

* add models endpoints
2023-10-07 00:04:12 +03:00

23 lines
452 B
Bash

#! /bin/bash
set -e
alembic upgrade "head"
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