Heroku is a cloud Platform as a Service (PaaS) based on containers. It provides developers with an elegant, flexible, and user-friendly platform to deploy, manage, and scale modern applications, offering the simplest path to bring apps to market. Extending Heroku can be accomplished by building add-ons, developing plug ins for Heroku CLI and more.

Extending Heroku

As of November 28th, 2022, Heroku discontinues its free tier, resulting in the shutdown of free Heroku Dynos, Postgres, and Redis servers. According to the Heroku Documentation, non-Enterprise users will witness the deletion of free databases starting from this date. For Enterprise users, hobby-dev databases associated with an Enterprise Account or Team will be converted to the mini tier.

Regarding size limits, the maximum slug size after compression is 500 MB, a threshold that should accommodate most apps comfortably. In terms of the Heroku API, it is rate-limited at 5,000 requests per connection per day. Any attempt to exceed this limit results in a 429 Too Many Requests status, with the response message indicating when the next API request can be expected.

AWS, an Infrastructure as a Service (IaaS) platform, provides developers with the necessary products to establish a development environment. In contrast, Heroku operates as a Platform as a Service (PaaS), offering a ready-to-use environment for developers to deploy code, perform simple configurations, and run applications.

Extending the Heroku platform is possible through various means:

  • Utilizing the Platform API for various app management tasks.
  • Implementing app webhooks to incorporate proactive platform notifications into workflows.
  • Building add-ons that Heroku customers can provision and use with their own apps.
  • Developing plugins for the Heroku CLI.
  • Creating buildpacks to support new languages or behaviors on Heroku.

Review Apps

Review Apps on Heroku execute code in GitHub pull requests within isolated Heroku apps that can be easily disposed of. Each Review App is assigned a unique URL, providing an excellent avenue for proposing, testing, and merging code changes. Configuration options allow for automatic or manual creation of Review Apps from the app’s Pipeline page, requiring both Heroku Pipelines and GitHub integration for utilization.

For users new to Review Apps, the setup involves connecting the pipeline to the corresponding GitHub repository in the Heroku Dashboard’s Settings tab. Additionally, configuring an app.json may be necessary for those unfamiliar with Review Apps, with sensitive config variable values set in the pipeline’s settings.

Permissions for all Review Apps and CI Apps within a pipeline are managed through the pipeline access tab. The process of creating Review Apps involves deploying the HEAD commit of the associated branch when manually created or automatically when a pull request is opened. Review Apps are automatically destroyed upon the closure of the associated pull request.

Viewing and managing Review Apps can be done through links available in GitHub’s pull request Conversation tab or the Heroku Dashboard’s Review Apps column. The app.json file in the app’s GitHub repo configures Review Apps, while sensitive environment variables are set in the Review App config vars section of the pipeline’s settings.

Environments in app.json follow a similar pattern to Heroku CI, and Review Apps support the “environments” key. Review App names rely on randomness to prevent collisions, and a postdeploy script in the app.json file facilitates one-time setup tasks for the app and databases. A release phase allows for continuous execution with each change to a pull request.

An optional pr-predestroy script in app.json runs when Review Apps are destroyed after the associated pull request is merged or closed. Injected environment variables, such as HEROKU_APP_NAME, HEROKU_BRANCH, and HEROKU_PR_NUMBER, provide essential information for scripting and automation.

Content updated December 2022.

Related Posts
Salesforce Jigsaw
Salesforce Jigsaw

Salesforce.com, a prominent figure in cloud computing, has finalized a deal to acquire Jigsaw, a wiki-style business contact database, for Read more

Alphabet Soup of Cloud Terminology
abc

As with any technology, the cloud brings its own alphabet soup of terms.  This insight will hopefully help you navigate Read more

We Are All Cloud Users
How Good is Our Data

My old company and several others are concerned about security, and feel more secure with being able to walk down Read more

Top Ten Reasons Why Tectonic Loves the Cloud
Cloud Managed Services

The Cloud is Good for Everyone - Why Tectonic loves the cloud  You don’t need to worry about tracking licenses. Read more