Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Hardcoding app runtime directory in buildpacks severely impacts their flexibility #3

Open
benlangfeld opened this issue Jan 18, 2016 · 1 comment

Comments

@benlangfeld
Copy link

Firstly, an apology; I know this repository is not the perfect place to file this issue, but I was unable to find any other public open-source forum that is more appropriate. If there is a more appropriate place, please let me know and I'll re-post.

Secondly, a reference for the source of the issue: crohr/pkgr#93

The short version is that it is not guaranteed that the app ends up installed to /app; users of buildpacks other than Heroku require applications to be stored at other paths, such as pkgr which uses /opt/${APP_NAME}. Furthermore, the application may not be mounted at runtime at the same path as the build directory, since not every buildpack executor uses a layered filesystem, and so must resort to using a sandbox build directory.

It is necessary for some buildpacks to reference the runtime application mount directory (for example the PHP buildpack).

I propose a modification to the buildpack API to add a further argument to the compile phase called RUN_DIR whose default is /app but which may be overridden by the likes of pkgr to another value, and Buildpacks may then depend on this where they currently have /app hard-coded for runtime usage. Compile time usage would continue to use the BUILD_DIR option.

@crohr
Copy link

crohr commented Jan 20, 2016

@benlangfeld unfortunately I don't think Heroku will be willing to implement this, since the /app issue also appears in all the precompiled binaries (e.g. PHP) that were compiled with an install prefix of e.g. /app/vendor/.heroku/php. Passing an option to the buildpack won't change that :(

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants