Raspberry Pi as Backup for Heroku discord.py Bot

So I have a Discord bot that runs on Heroku. Since I only have a runtime of 25 days on Heroku, I would now like to set up a Docker container with my bot. This should then serve as a backup so that I can connect my Raspberry Pi to the power supply on the 26th and it starts automatically. However, a check should take place whether the bot is still active on Heroku. And if not, then my Raspberry Pi should clone the bot from GitHub, like Heroku, and run it. How can I develop this check and that the bot is then fetched from GitHub before starting. My Raspberry Pi should then also have a restart so that I can restart the bot after a bug or an update and it downloads the new code.

Read more here: Source link