https://github.com/veelenga/heroku-buildpack-amber
https://github.com/veelenga/heroku-buildpack-amber
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/veelenga/heroku-buildpack-amber
- Owner: veelenga
- License: mit
- Created: 2017-07-11T17:23:02.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-20T12:14:09.000Z (over 7 years ago)
- Last Synced: 2025-02-07T19:29:17.699Z (4 months ago)
- Language: Shell
- Size: 85.9 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.tests
Awesome Lists containing this project
README
# Amber Heroku Buildpack
> Based on [Crystal Heroku Buildpack](https://github.com/crystal-lang/heroku-buildpack-crystal)
[](https://amberframework.org)
You can create an app in Heroku with Amber's buildpack by running the
following command:```bash
$ heroku create myapp --buildpack https://github.com/amberframework/heroku-buildpack-amber.git
```The default behaviour is to use the [latest crystal release](https://github.com/crystal-lang/crystal/releases/latest).
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. `0.17.1`).## Requirements
In order for the buildpack to work properly you should have a `shard.yml` file,
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 `config/application.cr` file:
```crystal
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 `.amber_secret_key` or `.encryption_key` during compilation process, so in this case you should remove the encryption key from `.gitignore` file.
> DISCLAIMER: Don't publish encryption key in open source projects if you have sensitive config
## Testing
To test a change to this buildpack, write a unit test in `tests/run` that asserts your change and
run `make test` to ensure the change works as intended and does not break backwards compatibility.## More info
This buildpack have been configured to work with [Amber Framework](https://amberframework.org/) projects.
To learn more about how to deploy other Crystal applications to Heroku, read
[this blog post](http://crystal-lang.org/2016/05/26/heroku-buildpack.html).## Older versions of Crystal
Currently latest Amber `v0.3.6` is compatible with Crystal `v0.23.1`
Other versions aren't guaranteed to be compatible.