⚠️ Latest Amber
v0.7.2is not compatible with Crystal
Please use a
Based on Crystal Heroku Buildpack
You can create an app in Heroku with Amber's buildpack by running the following command:
$ heroku create myapp --buildpack amberframework/amber
The default behaviour is to use the latest crystal release.
If you need to use a specific version create a
.crystal-version file in your
application root directory with the version that should be used (e.g.
In order for the buildpack to work properly you should have a
as it is how it will detect that your app is a Crystal app.
Your application has to listen on a port defined by Heroku.
Append the following code to your
Amber::Server.configure do |settings| settings.port = ENV["PORT"].to_i if ENV["PORT"]? end
To be able to use production enviroment config Heroku needs
.encryption_key during compilation process, so in this case you should remove the encryption key from
DISCLAIMER: Don't publish encryption key in open source projects if you have sensitive config
To test a change to this buildpack, write a unit test in
tests/run that asserts your change and
make test to ensure the change works as intended and does not break backwards compatibility.
This buildpack have been configured to work with Amber Framework projects.
To learn more about how to deploy other Crystal applications to Heroku, read this blog post.
Currently latest Amber
v0.3.6 is compatible with Crystal
Other versions aren't guaranteed to be compatible.
amberframework/amber buildpack from the Heroku Registry contains the latest stable version of the buildpack. If you'd like to use the latest buildpack code from this Github repository, you can set your buildpack to the Github URL:
heroku buildpacks:set https://github.com/amberframework/heroku-buildpack-amber
Copy the snippet above into CLI.