Jorge López
Jorge López

Reputation: 523

How to setup Django and Python telegram bot to deploy to Heroku?

When I deploy my Django app with my bot.py to Heroku there is a conflict because Django does not let the bot receive the calls.

Procfile

web: python bot.py
web: gunicorn tlgrmbot.wsgi

the logs show that it keeps looking for the https://herokuappname.com/token not found, because I don´t have urls, and if I only leave the python bot.py in the procfile the bot responds but it does not finds the Database.

Does someone knows how to resolve this?

Upvotes: 0

Views: 591

Answers (1)

Nurbek Merkibek
Nurbek Merkibek

Reputation: 31

You can use django-telegrambot, it is easy to set up and works well while deployed. Don't forget to set gunicorn workers = 1, so it will handle all requests.

Upvotes: 3

Related Questions