Apps that use the Ruby buildpack can now skip automatic database provisioning using an environment variable
Change effective on 16 December 2022
When applications are deployed to Heroku, the last buildpack to execute can request add-ons are provisioned via the
bin/release interface. The
heroku/ruby buildpack checks if the application contains a Postgres gem and requests that Heroku provision a database for the application automatically. Before the pricing change, the database requested was free, and adding this add-on by the buildpack would save developers time while setting up applications.
Developers using the
heroku/ruby buildpack to deploy new applications who do not want this behavior can now opt out by setting the
HEROKU_SKIP_DATABASE_PROVISION environment variable:
$ heroku config:set HEROKU_SKIP_DATABASE_PROVISION=1
This setting will prevent the database from being requested. This environment variable only affects
heroku/ruby users and only affects applications without a successful first deployment. Any already deployed applications that do not want a Heroku database must manually remove their add-on.
This environment variable interface is experimental and subject to change. Before any change, a deprecation warning will be emitted from the
heroku/ruby buildpack on deployment with additional details.
For more information, see Ruby database provisioning.