Heroku
Last Updated: 2020-08-01Example
An example project can be found at https://github.com/grouparoo/app-example. You can deploy this app with the following button:
Getting Started
- Create a new git repository
- Do not include an environment file,
.env
. Your environment variables will be managed by Heroku - Include a
package.json
file which contains your dependencies and commands per the Deployment Guide - Include a
Procfile
which is similar the to the below. Heroku usesProcfile
s to define the multiple processes which run for the same application. In theProcfile
we use Environment variables to differentiate between our web and worker processes. we also skip usingnpm
as our process runner, and call the grouparoo start command directly.
- Do not include an environment file,
# in Procfile
web: WEB_SERVER=true WORKERS=0 cd node_modules/@grouparoo/core && ./bin/start
worker: WEB_SERVER=false WORKERS=10 cd node_modules/@grouparoo/core && ./bin/start
- Add the Heroku add-on
heroku-postgres
viaheroku addons:create heroku-postgresql:<PLAN_NAME>
. Learn more about the plan options here: https://devcenter.heroku.com/articles/heroku-postgresql. This add-on will set the Environment VariableDATABASE_URL
which Grouparoo will automatically use. - Add the Heroku add-on
heroku-redis
viaheroku addons:create heroku-redis:<PLAN_NAME>
. Learn more about the plan options here: https://devcenter.heroku.com/articles/heroku-redis. This add-on will set the Environment VariableREDIS_URL
which Grouparoo will automatically use. - Push your git project to Heroku, or configure Heroku to monitor your Github repo for changes automatically
Visit your new Heroku URL and create your first Grouparoo Team member!
Notes
Grouparoo will source Heroku's PORT
variable automatically to bind to the proper variable port.
Grouparoo will automatically build your project (compiling typescript and including your plugins) after any npm install
, which Heroku will automatically run, as there is a package.json
checked into your git repository.
You can scale the number of web
and worker
processes with the heroku ps
command. Depending on your workload, you may need more of one type of process than another.
You can start with Heroku's free tier and increase your plan sizes as needed.
Heroku will regularly restart/rebuild your dynos. You may at times see "stuck" background task in the resque
dashboard. Grouparoo will automatically rescue these jobs and retry them after an hour.
Having Problems?
If you are having trouble, visit the list of common issues or open a Github issue to get support.