Code Monkey home page Code Monkey logo

heroku-buildpack-stack's Introduction

Heroku buildpack for Stack. Based on the excellent heroku-buildpack-ghc

Usage

Create an app with this buildpack:

$ heroku create --buildpack https://github.com/mfine/heroku-buildpack-stack.git

Set this buildpack on an existing app:

$ heroku buildpacks:set https://github.com/mfine/heroku-buildpack-stack

Binary executables are placed in /app/.local/bin/ after compilation, a directory which Heroku includes in your $PATH, so assuming that your application is binding to $PORT, you can serve your app by creating a Procfile at your project root that defines a web process type for the executable defined in your .cabal file:

$ cat *.cabal | grep executable
executable YOURAPPNAME-exe

$ echo "web: YOURAPPNAME-exe" >> Procfile

Templating stack.yaml

To avoid committing secrets into stack.yaml for access to private repos, an app's config vars values can be substituted for tags enclosed in double brackets. For example, given a stack.yaml containing:

packages:
-location:
    git: https://mfine:{{GITPASS}}@github.com/mfine/heroku-buildpack-stack.git

and an application with config vars:

$ heroku config -app calm-storm-51595
=== murmuring-beyond-51595 Config Vars
GITPASS: abc123
$

before compilation, the stack.yaml will be substituted as follows:

packages:
-location:
    git: https://mfine:[email protected]/mfine/heroku-buildpack-stack.git

Makefile Support

This buildpack now supports an optional Makefile, in case you need to coordinate other build steps with Stack. It assumes that the Makefile includes a make install target that uses the Stack build command with the flag --copy-bins. For example, a possible install target configuration in the Makefile could be:

install:
    stack build --copy-bins

heroku-buildpack-stack's People

Contributors

mfine avatar ismailmustafa avatar bchase avatar eriknstevenson avatar akhra avatar 2mol avatar aaronshim avatar pianostringquartet avatar nrolland avatar hone avatar truedrog avatar

Watchers

James Cloos avatar

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.