This is a mashup of https://github.com/Scalingo/multi-buildpack and https://github.com/timanovsky/subdir-heroku-buildpack.
This buildpack uses the
.buildpacks file as
https://github.com/Scalingo/multi-buildpack does, but before that, like
https://github.com/timanovsky/subdir-heroku-buildpack, it moves all files from
the subdirectory designated by the
BUILDPACK_SUBDIR variable to the build
Allows you to have a monolithic repo (like Google!) with multiple Heroku/Scalingo apps in different subdirectories.
.buildpacksfile in the app's directory listing the required buildpack(s) for this app as described in https://github.com/Scalingo/multi-buildpack/blob/master/README.md
heroku buildpacks:set -a <app> https://github.com/1024pix/subdir-buildpack/
scalingo env-set -a <app> BUILDPACK_URL=https://github.com/1024pix/subdir-buildpack
heroku config:add BUILDPACK_SUBDIR='<subdir>' -a <app>/
scalingo env-set -a <app> BUILDPACK='<subdir>'
git push, automatic deploy…)
The buildpack takes the subdirectory you configured, erases everything else, and copies that subdirectory to project root. Then it downloads each of the requested buildpacks and hands the slug compilation process over to them.
BUILDPACK_SUBDIR is not set, this buildpack will behave like
Copy the snippet above into CLI.