GitHub Readme.md
This buildpack converts a subfolder application within a monorepo into the main (Heroku) application.
This buildpack's detect script expects a .monorepo
file to be found in the project's root folder.
[~/yourproject] touch .monorepo
[~/yourproject] git add .monorepo
[~/yourproject] git commit -m 'Support Monorepo Buildpack'
[~/yourproject] git push
Note: The file contents do not matter.
This Monorepo buildpack works by moving the application subfolder up to the root folder level. Since this needs to happen before the application buildpacks are engaged (e.g. Node, Ruby, etc) this buildpack needs to run first.
Note: Once you add a custom buildpack Heroku stops guessing which "other" buildpacks to run after so you will have to add them to this screen manually now (after this buildpack).
Since a Monorepo will presumably have more than one subfolder application you need to tell it which one to use.
APP_PATH
to the subfolder application that you want to deploy to this application container.Example:
├── .monorepo
├── README.md
├── backend
│ ├── Procfile
│ ├── index.js
│ └── package.json
├── nested
| └── api1
| ├── Procfile
| ├── index.js
| └── package.json
└── frontend
│ ├── Procfile
│ ├── index.js
│ └── package.json
In the above example APP_PATH
could be set to backend
, nested/api1
or frontend
.
Your Monorepo subfolder application is now configured to run inside your Heroku application. Push it as you would any other.
MIT
Copy the snippet above into CLI.