Git Product home page Git Product logo

heroku-bundle-config's Introduction

Heroku buildpack: Heroku Bundle Config

This is a simple Heroku buildpack. Having only one simple puprose. That is to seek for a folder .heroku_bundle. If such a file is found what this buildpack will do is it will rename the folder .heroku_bundle to just .bundle. Now, when heroku installs your gems, it will consult this folder and try to find a file /config in it for extra configuration options etc. to use for various gems. For more information on the structure of the file see: This nice gist (there's also a sample config file). If you do not want to manually mess with config file syntax you can refer to the the official documentation and generate the config file locally via bundler commands like bundle config --local build.some_gem "--with-cppflags='-I/app/vendor/prebuilt/include' --with-ldflags='-L/app/vendor/prebuilt/lib'". Obviously, this buildpack is pretty much useless on its own, so should you wish to use it you ought to use it in conjunction with the Heroku Builpack Multi.

Usage

Example usage:

#Providigin that you have somehow compiled the libraries for the Heroku dynos and copied the prebuilt libraries to vendor/prebuilt...
$ echo >> "gem 'libarchive-ruby'" >> Gemfile
$ bundle
$ heroku run --app cat .bundle/config > .bundle/config #This is to copy the default stuff heroku uses on it's own as the basis...
$ bundle config --local build.libarchive-ruby "--with-cppflags='-I/app/vendor/prebuilt/include' --with-ldflags='-L/app/vendor/prebuilt/lib'"
$ mv .bundle .heroku-bundle #You do not want to use this version of the gem locally.. only on heroku
$ git add .heroku-bundle Gemfile Gemfile.lock
$ git commit -m "Added libarchive-ruby gem."
$ git push heroku master
...
-----> Heroku receiving push
-----> Fetching custom buildpack
-----> Heroku Bundle Config app detected
-----> Found a .heroku-bundle folder

The buildpack will detect that your app has a .heroku-bundle folder in the root app directory. This folder will be renamed to .bundle. If a .bundle folder already exists it will be deleted.

heroku-bundle-config's People

Contributors

timolehto avatar leemhenson avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.