This is a Heroku buildpack for adding pre-compiled custom binaries into your project.
Add this buildpack to your Heroku project:
heroku buildpacks:add https://github.com/tonyta/heroku-buildpack-custom-binaries#v1.0.0
.custom_binaries file to the root of your project with the names and
urls of your gzipped tarballed binary (YAML format):
# app_root/.custom_binaries executable-name: https://s3-us-wet-1.amazonaws.com/url-to-your-binary/your-archive.tar.gz another-binary: https://s3-us-wet-1.amazonaws.com/url-to-other-binary/archive.tar.gz
This buildpack will unarchive your binary and add it to
Heroku compiles your project's slug. It will also create a
that will append this directory to
$PATH to your binary whenever your app is
Great news! All Heroku projects use Heroku's Cedar-14 stack on Ubuntu 14.04 LTS so you have to do is compile your binary on a similar environment, compress it into a gzipped tarball, then host it somewhere it's available via url.
The simplest way to do this is to compile from source on either a fresh Heroku project or using the Heroku's Cedar-14 docker image.
Create a blank Heroku project:
heroku create heroku run bash --app that-projects-name
Then you can build from source and transfer it locally using
You can also use Heroku's official Cedar-14 image:
docker run -it heroku/cedar:14 bash
This has the additional convenience of being able transfer your binary to a
bind-mounted volume when you use the
Build a gzipped tarball bundle of the resulting binary:
tar -cvzf archive-name.tar.gz binary-to-compress
Then make it available via URL through Amazon S3 or your favorite online file storage.
Copy the snippet above into CLI.