logo

Heroku

On heroku use a Procfile to specify a separated process to run the agent with the context of your application.
Modify a Procfile and just include the hoopstart script:
shell
web: hoopstart -- bundle exec puma -C config/puma.rb
Procfile ruby example
Hoop is configured on Heroku using our custom buildpack. The agent could be started alongside any process that stays running (e.g.: web process). The following environment variables could be configured:
NAME
REQUIRED
DESCRIPTION
HOOP_KEY
yes
The credential key used to authenticate in the gateway
HOOP_VERSION
no
The version of the agent to install, default to the latest one
💡
We require creating an authentication key in embedded mode for Heroku.

Installing the Buildpack

Using multiple buildpacks for an application allows starting the agent alongside any workload deployed on heroku.
Just add the hoop buildpack at the first position in the order of buildpack execution:
shell
heroku buildpacks:add --index 1 https://github.com/hoophq/heroku-hoop-buildpack
Make sure that the primary language of your app is the last buildpack in the list. More Info

Configuring the Procfile

The Procfile contains the definition of the application runtime. Use the hoopstart which will start the agent in the background and then start your main process (after --).
shell
web: hoopstart -- bundle exec puma -C config/puma.rb
Procfile ruby example
Make sure that the main process stays alive, the hoop agent will run in background as long the main process stays running (for this example: bundle exec puma -C config/puma.rb)

Configuring Connections

When the main application starts it’s possible to configure how users will interact with the workloads, like:
  • Edit the entrypoint of the connection
  • Configure plugins
  • Propagate custom environment variables

Powered by Notaku