mirror of
https://github.com/Balshgit/gpt_chat_bot.git
synced 2026-02-03 11:40:39 +03:00
initial commit
This commit is contained in:
11
scripts/healthcheck_bot.service
Normal file
11
scripts/healthcheck_bot.service
Normal file
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Healthcheck bot
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
[Service]
|
||||
Restart=always
|
||||
WorkingDirectory=/opt/healthcheck_bot
|
||||
ExecStart=/usr/local/bin/docker-compose -f /opt/healthcheck_bot/docker-compose.yml up
|
||||
ExecStop=/usr/local/bin/docker-compose -f /opt/healthcheck_bot/docker-compose.yml down
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
17
scripts/start-bot.sh
Normal file
17
scripts/start-bot.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#! /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
|
||||
Reference in New Issue
Block a user