From e982c472521e4ee846b633f6537b181b9f52883a Mon Sep 17 00:00:00 2001 From: lzzy12 Date: Fri, 10 Jan 2020 17:29:12 +0530 Subject: [PATCH] Drop official support for heroku Signed-off-by: lzzy12 --- README.md | 50 -------------------------------------------------- heroku.yml | 5 ----- 2 files changed, 55 deletions(-) delete mode 100644 heroku.yml diff --git a/README.md b/README.md index d973636..d92f9c4 100644 --- a/README.md +++ b/README.md @@ -84,53 +84,3 @@ sudo docker build . -t mirror-bot ``` sudo docker run mirror-bot ``` - -## Deploying on Heroku -- Run the script to generate token file(token.pickle) for Google Drive: -``` -python3 generate_drive_token.py -``` -- Install [Heroku cli](https://devcenter.heroku.com/articles/heroku-cli) -- Login into your heroku account with command: -``` -heroku login -``` -- Create a new heroku app: -``` -heroku create appname -``` -- Select This App in your Heroku-cli: -``` -heroku git:remote -a appname -``` -- Change Dyno Stack to a Docker Container: -``` -heroku stack:set container -``` -- Add Private Credentials and Config Stuff: -``` -git add -f credentials.json token.pickle config.env -``` -- Commit new changes: -``` -git commit -m "Added Creds." -``` -- Push Code to Heroku: -``` -git push heroku master --force -``` -- Restart Worker by these commands: -``` -heroku ps:scale worker=0 -``` -``` -heroku ps:scale worker=1 -``` -Heroku-Note: Doing authorizations ( /authorize command ) through telegram wont be permanent as heroku uses ephemeral filesystem. They will be reset on each dyno boot. As a workaround you can: -- Make a file authorized_chats.txt and write the user names and chat_id of you want to authorize, each separated by new line -- Then force add authorized_chats.txt to git and push it to heroku -``` -git add authorized_chats.txt -f -git commit -asm "Added hardcoded authorized_chats.txt" -git push heroku heroku:master -``` diff --git a/heroku.yml b/heroku.yml deleted file mode 100644 index 75581ef..0000000 --- a/heroku.yml +++ /dev/null @@ -1,5 +0,0 @@ -build: - docker: - worker: Dockerfile -run: - worker: bash start.sh \ No newline at end of file