These bots are deployed at heroku, where only one so-called dyno is for free.
Hence one backend is used for all my bots.
-
First of all, update pipenv and start the local heroku server.
# update pipenv source ./utils/prepare_deployment.sh "<telegram-bot-api branch>" # start local heroku server pipenv run heroku local
-
Then make the local heroku server available via
ngrok:ngrok http 5000
-
Update the telegram bots' webhooks using environment variables.
pipenvis used for the right environment variables, which can be set in a local.envfile.# update webhook in .env pipenv run python utils/set_webhook_to_ngrok.py
-
Update pipenv using the following script.
# update pipenv source ./utils/prepare_deployment.sh "master"
-
Set the webhook to heroku, not to
ngrok.pipenv run python utils/set_webhook_to_heroku.py
-
Push to master since heroku automatically deploys from github.
- clean up utils script