I've got a Heroku app which automatically deploys when I'm pushing changes to GitHub. It's a Discord Bot (written in python).
Now I want to automatically start this python script when I'm going to deploy (It should run 24/7 until it's stopped by a new deploy).
I read about Dynos but don't know how to use them. I already added the Procfile
with bot: python bot.py
but this won't auto start the app. The Dyno is only shown in the resources tab on the dashboard. Using heroku ps -a myapp
it responds with No dynos on ⬢ myapp
. The bot: python bot.py
Dyno in the dashboard also can't be started through that switch.
Screenshot: The switch can't be activated
So I tried to use release: python bot.py
which starts the bot but after another deploy the processes are stacking up and the bot is running multiple times.