by SectorLabs
GitHub Readme.md
Allows you to compose multiple buildpacks with apps in multiple directories. For information regarding adding multiple buildpacks, check out the official docs here.
This buildpack must be at index 1 and all buildpacks following should be at index 2 through N.
$ heroku buildpacks:set https://github.com/negativetwelve/heroku-buildpack-subdir
Example .buildpacks
file:
$ cat .buildpacks
https://github.com/heroku/heroku-buildpack-nginx
api=https://github.com/heroku/heroku-buildpack-ruby
web=https://github.com/heroku/heroku-buildpack-nodejs
web=https://github.com/heroku/heroku-buildpack-pgbouncer
https://github.com/heroku/heroku-buildpack-go
This would run:
nginx
buildpack.cd
into an api
directory and use a ruby
buildpack.cd
into a web
directory and use a nodejs
buildpack.cd
into a web
directory and use a pgbouncer
buildpack.go
buildpack.Buildpacks are executed in the order they are declared.
.profile.d
scripts are left behind by buildpacks and are invoked by Heroku when the dyno is starting. This allows buildpacks to update the PATH
environment for example. Since buildpacks can be ran in subdirectories, the .profile.d
scripts left behind by these buildpacks are not invoked by Heroku.
Support for this recently landed in this buildpack but is still experimental. You can enable it by setting the SUBDIR_ENABLE_PROFILE_SOURCING
setting on your Heroku app:
$ heroku config:set SUBDIR_ENABLE_PROFILE_SOURCING=1
You can read more about the role of .profile.d
scripts in the Heroku documentation:
https://devcenter.heroku.com/articles/buildpack-api#profile-d-scripts
Note: if you're using the Python or Node.js buildpack, you most likely want to enable this setting.
Copy the snippet above into CLI.