Giter VIP home page Giter VIP logo

heroku-buildpack-hello's Introduction

Heroku buildpack: Hello

This is an example Heroku buildpack.

Usage

Example usage:

$ ls
hello.txt

$ heroku create --buildpack http://github.com/heroku/heroku-buildpack-hello.git

$ git push heroku master
...
-----> Heroku receiving push
-----> Fetching custom buildpack
-----> HelloFramework app detected
-----> Found a hello.txt

The buildpack will detect that your app has a hello.txt in the root. If this file has contents, it will be copied to goodbye.txt with instances of the world hello changed to goodbye.

Hacking

To use this buildpack, fork it on Github. Push up changes to your fork, then create a test app with --buildpack <your-github-url> and push to it.

For example, you can change the displayed name of the buildpack to GoodbyeFramework. Open bin/detect in your editor, and change HelloFramework to GoodbyeFramework.

Commit and push the changes to your buildpack to your Github fork, then push your sample app to Heroku to test. You should see:

-----> GoodbyeFramework app detected

heroku-buildpack-hello's People

Contributors

ddollar avatar dzuelke avatar oguzbilgic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

heroku-buildpack-hello's Issues

Hardcoding app runtime directory in buildpacks severely impacts their flexibility

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.