Table of Contents
git push heroku, Heroku’s slug compiler prepares your code for execution by the Heroku dyno manager. At the heart of the slug compiler is a collection of scripts called a buildpack.
Heroku’s Cedar stack has no native language or framework support; Ruby, Python, Java, Clojure, Node.js, Scala and PHP are all implemented as buildpacks.
If you have questions about the build process on Heroku, consider discussing it in the Build forums.
Heroku maintains a collection of buildpacks that are available by default to all Heroku apps during slug compilation.
These buildpacks are open-source and available on Github. If you have a change that would be useful to all Heroku developers, we encourage you to submit a pull request.
By default, these buildpacks will be searched in this order until a match is detected and used to compile your app.
Custom buildpacks can be used to support languages or frameworks that are not convered by Heroku’s default buildpacks. For a list of known third-party buildpacks, see Third-Party Buildpacks.
Using a custom Buildpack
You can specify an exact version of a buildpack by using a git revision with the
You can override the Heroku default buildpacks by specifying a custom buildpack with the
$ heroku buildpacks:set https://github.com/heroku/heroku-buildpack-ruby
You can change the buildpack used by an application by setting the buildpack value. When the application is next pushed, the new buildpack will be used.
Previously you could set a config var for
BUILDPACK_URL, this value will still be used if set, though a buildpack value set through the CLI will take precedence.
BUILDPACK_URL as a config var is now deprecated in favor of the buildpack value on the API and in the future will be migrated.
You can also specify a buildpack during app creation:
$ heroku create myapp --buildpack https://github.com/heroku/heroku-buildpack-ruby
Your buildpack value can point to either git repositories or tarballs. Hosting a buildpack on S3 can be a good way to ensure it’s highly available.
Creating a buildpack
If you’d like to use a language or framework not yet supported on Heroku you can create a custom buildpack. To get started, see the following articles:
- To learn about the structure of a buildpack, see Buildpack API.
You can use the heroku-buildpacks CLI plugin to publish buildpacks to our catalog.