Skip to content

Latest commit

 

History

History
93 lines (50 loc) · 5.35 KB

heroku.md

File metadata and controls

93 lines (50 loc) · 5.35 KB
description
Deploy Modmail on Heroku PaaS.

Heroku

What is Heroku?

Heroku is a container-based cloud Platform as a Service (PaaS). Developers use Heroku to deploy, manage, and scale modern apps.

Requirements

Costs

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.

Fork our GitHub repositories

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.

Screenshot of creating a Modmail 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.

Screenshot of creating a Logviewer 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.

Screenshot of installing the pull app.

Click Install to install the Pull app.

Screenshot of selecting both repositories.

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.

Create a Heroku account

Updating

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.

Forking the repo

Before you get started, you must fork the repo first if you are using Heroku and want to update the bot.

Syncing a fork branch from the web UI

  1. On GitHub, navigate to the main page of the forked repository that you want to sync with the upstream repository.

  2. Select the Sync fork dropdown.

    sync-fork-dropdown

  3. Then click Update branch.

    update-branch-button

If the changes from the upstream repository cause conflicts, GitHub will prompt you to create a pull request to resolve the conflicts.

I want to enable automatic updates

  1. Create a GitHub account
  2. Fork the repository
  3. Add GITHUB_TOKEN into your configuration variables from https://github.com/settings/tokens with the repo scope (Guide).
  4. Link your GitHub account to heroku
  5. Turn on automatic deploys
  6. Restart the bot

I want to update the bot once

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.