Expand All Steps to Deploy Click Here
Step 1 : Fork and Star the Repository
- Click the Fork button at the top-right corner of this repository.
Star the repository to show your support.
Step 2 : Navigate to Your Forked Repository
- Access your forked version of the repository.
Step 3 : Enable GitHub Actions for your repo
- Go to the Settings tab of your forked repository.
- Enable Actions by selecting the appropriate option in the settings.
Step 4 : Run the Deployment Workflow to Deploy
- Open the Actions tab.
- Select the
Deploy to Herokuworkflow from the available list. - Click Run workflow and fill out the required inputs:
- BOT_TOKEN: Your Telegram bot token.
- OWNER_ID: Your Telegram ID.
- DATABASE_URL: MongoDB connection string.
- TELEGRAM_API: Telegram API ID (from my.telegram.org).
- TELEGRAM_HASH: Telegram API hash (from my.telegram.org).
- HEROKU_APP_NAME: Name of your Heroku app.
- HEROKU_EMAIL: Email address associated with your Heroku account.
- HEROKU_API_KEY: API key from your Heroku account.
- HEROKU_TEAM_NAME (Optional): Required only if deploying under a Heroku team account.
- UPSTREAM_REPO: Upstream Repo of your Fork or Main Repo
- Run the workflow and wait for it to complete.
Step 5 : Finalize Setup of your bot
- After deployment, check logs in your Heroku dashboard, If problem, Reach to Support Group.
- Use the
/bsettingscommand to upload sensitive files liketoken.pickleif needed as well as all the important Variables within it.NOTE : Don't Add any Other variable except the Variables mentioned here.
Expand All Steps to Deploy Click Here
Step 1 : Git clone this Repo and change directory
Make sure git is Installed in your system or quick run
apt-get install git pip curl -y
git clone https://github.com/BeastBots/BeastDeploy deploy && cd deployStep 2 : Now Install Heroku in your Sytem or checkout Official Heroku Deploy Docs, or Download via apt-get or npm
For Android : Use
termux(Download via FDroid) for CLI usage
The script requires sudo and isn’t Windows compatible.
curl https://cli-assets.heroku.com/install.sh | shInstall with Ubuntu / Debian apt-get
curl https://cli-assets.heroku.com/install-ubuntu.sh | shInstall via npm (Not Recommanded)
npm install -g herokuOfficial Heroku Install Guide : Check Here
Step 3 : Login into Heroku and Log In CLI via Browser
With Browser
heroku loginOR
Without Browser
heroku login -i- Put
Heroku Email: Heroku Emailemail@example.com - Put
Heroku Password: Heroku API Key. Get from Here
Step 4 : Create Heroku App and specify stack and region with App Name
heroku create --region eu --stack container APP_NAMETo Be Noted: Copy the BASE_URL after the App is Created and Put the Value in BASE_URL when editing config.py
Notes:
--region eufor Europe Server.--region usfor United States Server.APP_NAMEshould be replaced with your unique app name (Optional). If not given it generates a random name.--stack containerfor setting stack to container for Dockerfile.--buildpack heroku/pythonfor using build slug for repo deploy and build.
Step 5 : Now set all the Required Variables and Files into this Branch MAIN Repo like config.py, accounts.zip, token.pickle, All Private Files(optional)-
Only config.py Mabdatory with Only Mandatory Vars Only, After that Put all Private Files or Vars via Bot Settings
/bs
To Edit Inside CLI (nano Editor): (Termux Users)
nano config.py- Sample config.py (Copy these and Paste in Editor and Fill Up)
BOT_TOKEN = "" TELEGRAM_API = 0 TELEGRAM_HASH = "" OWNER_ID = 0 UPSTREAM_REPO = "" UPSTREAM_BRANCH = "master" DATABASE_URL = "" BASE_URL = "" - After Setup Save from Editor via
CTRL + OandEnter, followed viaCTRL + X!
Helpful Commands:
- Exit from nano :
CTRL + X - Save File :
CTRL + O - Check Help :
CTRL + G - Undo Changes :
ALT + U - ^ means CTRL (Termux Users)
Step 6 : Set Local git remote for Heroku. Give All Commands One by One.
git add . -f
git commit -m "HK Setup"
heroku git:remote -a APP_NAMEStep 7 : Now push to Heroku via git forcefully to build.
git push heroku master -fHeroku Logs: When checking Logs, Use this will give Complete Logs.
heroku logs -a APP_NAME -t- Add arg
-tfor Live Stream Logs and UseCTRL + Cto Exit from it.
All Heroku CLI Commands : Click Here
View All Variables Click Here
BOT_TOKEN: Telegram Bot Token that you got from BotFather.StrOWNER_ID: Telegram User ID (not username) of the Owner of the bot.IntTELEGRAM_API: This is to authenticate your Telegram account for downloading Telegram files. You can get this from https://my.telegram.org.IntTELEGRAM_HASH: This is to authenticate your Telegram account for downloading Telegram files. You can get this from https://my.telegram.org.StrBASE_URL: Valid BASE URL where the bot is deployed to use torrent web files selection. Format of URL should behttps://app-name-random_code.herokuapp.com/, whereapp-nameis the name of your heroku app Paste the URL got when the App was Made.StrDATABASE_URL: Database URL of MongoDb to store all your files and Vars. Adding this will be Helpful.StrUPSTREAM_REPO: GitLab repository URL, if your repo is private addhttps://<deploy_token>:<password>@gitlab.com/<your_username>/<repository_name>format.Str.- NOTE: Don't forget to remove '<' and '>'. To generate gitlab Deploy Token. Follow This
- Any change in docker you need to deploy/build again with updated repo to take effect.
- No Need to delete .gitignore file or any File
- NOTE: Don't forget to remove '<' and '>'. To generate gitlab Deploy Token. Follow This
UPSTREAM_BRANCH: Upstream branch for update. Default iswzv3.Str
- All files to be Uploaded in this
mainBranch and set Upstream asmasterBranch of actual repo.