description |
---|
Deploy Modmail on Heroku PaaS. |
Heroku is a container-based cloud Platform as a Service (PaaS). Developers use Heroku to deploy, manage, and scale modern apps.
- A credit card (for payment and verification).
- An email account.
- A GitHub account.
- You have completed the initial steps: invited your bot and created a MongoDB database.
Unfortunately, Heroku is no longer free-of-charge. You will need at least their Eco plan, which currently costs $5 USD per month. See their pricing page for more info and up-to-date prices.
If you are a higher-education student, you may be eligible for their student offer, which grants you $13 USD of credits per month for 12 months—enough to host Modmail free for one year.
You will need to fork our repositories to deploy onto Heroku.
Make sure you're logged in to GitHub. You will need to fork two repositories.
First we fork the Modmail repository. Head over to https://github.com/kyb3rr/modmail/fork, leave all the settings as default, and click Create fork.
Create a GitHub fork for the Modmail Repository.
Next do the same for the Logviewer repository by heading over to https://github.com/kyb3r/logviewer/fork, leave all the settings as default, and click Create fork.
Create a GitHub fork for the Logviewer Repository.
Next, to keep your Modmail and Logviewer up to date, you will need to install the Pull app. Simply head over to https://github.com/apps/pull, click Install, choose Only select repositories, then select both the Modmail and Logviewer repositories that you forked in the previous step.

Click Install to install the Pull app.

Select both the Modmail and Logviewer forks, then click Install.
Your GitHub should now be all set. Next step, create a Heroku account to deploy your bot.
You can update Modmail on your Heroku account whenever changes are made to the repository. If you want to update while hosting locally (not Heroku), simply type git pull
in your terminal and install the requirements again with pipenv install
.
Before you get started, you must fork the repo first if you are using Heroku and want to update the bot.
-
On GitHub, navigate to the main page of the forked repository that you want to sync with the upstream repository.
-
Select the Sync fork dropdown.
-
Then click Update branch.
If the changes from the upstream repository cause conflicts, GitHub will prompt you to create a pull request to resolve the conflicts.
- Create a GitHub account
- Fork the repository
- Add GITHUB_TOKEN into your configuration variables from https://github.com/settings/tokens with the repo scope (Guide).
- Link your GitHub account to heroku
- Turn on automatic deploys
- Restart the bot
Click here to create a new pull request to your fork. Select compare across forks
, make the base repository yourusername/modmail
and ensure the branch is set to master. Put any title you want and create the pull request. On the page that comes after this, merge the pull request.
You then want to go to your modmail application in Heroku, connect your modmail fork via the Deploy
tab and deploy the master
branch.
You can turn on auto-deploy for the master branch if you don't want to go through the process of logging into Heroku and deploying the branch every time changes to the repo are made in the future. However, you will have to make a pull request to update your fork every time.