Can someone give instructions on how to expand the bot on the Heroku server (written on
question@mail.ru
·
01.01.1970 03:00
Deet bot on the Heroku server
answer@mail.ru
·
01.01.1970 03:00
- First of all, create a
gitrepository in a folder with a bot:git init - Enter
Heroku Heroku Login - Create the application:
Heroku Create AppName --region EU -
Create a file
procfile with the contents:Bot: Bot: Bot: Bot: Bot: Bot: Bot: Bot: Bot: Bot: Bot: Bot: Python Main.py - If the bot on web-huki, replace
BotwithWeb. But at a free tariff, the bot will fall asleep every 30 minutes if there are no connections, which is why it is better to keep bots on Long-filling onheroku free. But the problem with falling asleep of the web application is solved with the help of.
- If the bot on web-huki, replace
-
now you need to pack all the dependencies of the project:
pip freeze & gt; Requirements.txt - Now our folder looks approximately like this:
procfile main.py recept
- Now our folder looks approximately like this:
-
commimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimimmitics comimimi Changes:
git add. then git comit -m 'comit' -
heroku :git push heroku Master -
Launch the bot:
heroku ps: Scale Bot = 1 -
Watch logs:
Heroku Logs -t
that’s all.