This document describes how to set up Heroku Review Apps for PR preview deployments.
- Heroku CLI installed (
brew tap heroku/brew && brew install heroku) - Access to the Heroku team (
kernelbot) - Admin access to the GitHub repository
heroku pipelines:create kernelboard --app kernelboard --stage production --team kernelbot- Go to the Heroku Dashboard
- Navigate to your pipeline
- Click "Connect to GitHub" and authorize the repository
- In the pipeline view, click "Enable Review Apps"
- Check "Create new review apps for new pull requests automatically"
- Check "Destroy stale review apps automatically" (recommended: after 5 days)
heroku reviewapps:enable --pipeline kernelboard --autodeploy --autodestroyReview apps auto-provision:
DATABASE_URL(from heroku-postgresql add-on)REDIS_URL(from heroku-redis add-on)SECRET_KEY(auto-generated in code)
Discord environment variables are optional for previews. The app will run without them, but Discord login and scheduled events won't work.
If you want full functionality, inherit these from production:
DISCORD_BOT_TOKENDISCORD_GUILD_IDDISCORD_CLIENT_IDDISCORD_CLIENT_SECRETDISCORD_CLUSTER_MANAGER_API_BASE_URL
- Create a PR against
main - Heroku automatically builds and deploys a preview
- A comment with a link to the pipeline appears on the PR
- The preview updates on every push to the PR
- The preview is destroyed when the PR is closed/merged
Check the logs:
heroku logs --tail --app <review-app-name>Common issues:
- Missing
DATABASE_URLorREDIS_URL- check that add-ons were provisioned - The
app.jsonfile must be present in the repository root
- Verify GitHub is connected: Check pipeline settings in Heroku Dashboard
- Verify review apps are enabled:
heroku reviewapps --pipeline kernelboard - Check that
app.jsonexists in the repository root