Starter kit for running a Telegram bot (built with the python-telegram-bot library) on Openshift.
Instructions:
Register at Openshift.This starter kit works on Openshift online v2, which no longer accepts registration as Red Hat is moving to the new (v3) version. You must either have an existing account for the previous version or adapt the code to run in the new one. Send me a pull request if you manage to do so.- Create a Python3 application.
- Complete the
bot.py
file with your bot's token and handlers. - Put the
wsgi.py
file at the root of your app directory tree. Thebot.py
file can go anywhere as long as you update theimport
statement in the previous file. - Put a
requirements.txt
file also at the root of the directory tree. Include Flask and python-telegram-bot among your dependencies. - Deploy everything to Openshift.