-
-
Notifications
You must be signed in to change notification settings - Fork 279
Deploying to Heroku
Levi edited this page Dec 28, 2021
·
8 revisions
There are two methods available for deploying this bot to Heroku
- Fork the repo
- On the forked repo, go to Settings -> Secrets and click on the New repository secret button
- Now enter the vars one by one with value
-
HEROKU_API_KEY
: Get the API Key from Heroku Account Settings -
HEROKU_EMAIL
: Email address of your Heroku Account -
HEROKU_APP_NAME
: Name of your Heroku App. It must be unique on Heroku. -
CONFIG_ENV_URL
: Upload the config.env file on GitHub Gist. Now open the raw link of that gist and remove commit id from the link. Then fill the var with that link.
- Then go to the Actions tab on your repo
- Select Deploy to Heroku from the All workflow list
- Click on Run workflow -> Run workflow
- After that turn on the app dyno
Note: Don't change variables from Heroku. If you want to change any var, do it in config.env file on your gist, after that restart the app dyno.
- Install Heroku CLI
- Login to your heroku account
heroku login -i
- Create a new app
heroku apps:create APPNAME
- Connect the app to the repo
heroku git:remote -a APPNAME
- Change stack of the app to container
heroku stack:set container -a APPNAME
- Add the config files
git add -f .
- Commit new changes
git commit -m "Added config"
- Push the repo to heroku
git push heroku main --force
- Now restart the app dyno
heroku ps:scale worker=0 -a APPNAME
heroku ps:scale worker=1 -a APPNAME
Note: Remember to replace
APPNAME
with your app's name.