by 1024pix


Subdir buildpack

This is a mashup of and

This buildpack uses the .buildpacks file as does, but before that, like, it moves all files from the subdirectory designated by the BUILDPACK_SUBDIR variable to the build root.

Allows you to have a monolithic repo (like Google!) with multiple Heroku/Scalingo apps in different subdirectories.


  • For each app that lives in your repository, create a .buildpacks file in the app's directory listing the required buildpack(s) for this app as described in
  • Create a bunch of Heroku/Scalingo apps to host your repository's apps.
  • For each app do heroku buildpacks:set -a <app> / scalingo env-set -a <app> BUILDPACK_URL=
  • For each app, specify a <subdir> by running heroku config:add BUILDPACK_SUBDIR='<subdir>' -a <app> / scalingo env-set -a <app> BUILDPACK='<subdir>'
  • Deploy your app as usual (git push, automatic deploy…)

How it works

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.

If BUILDPACK_SUBDIR is not set, this buildpack will behave like .