Skip to content

mikegehard/cloudfoundry-buildpack-haskell-stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 

Repository files navigation

Cloud Foundry buildpack for Stack based Haskell projects. Based on the excellent heroku-buildpack-stack.

Usage

Push an app with version 1.0 of this buildpack:

$ cf push haskell-api -b  https://github.com/mikegehard/cloudfoundry-buildpack-haskell-stack#1.0 -m 2GB

Note: The first push of an application requires a lot of memory to prime the Stack cache with all of the libraries. It is recommended that you set the app memory to 2GB for the first push and scale it back down after the push completes. You may also need to scale up before subsequent pushes and scale down after those pushes complete. It seems that the v3 Cloud Controller API will allow for setting the compilation container memory differently than the runtime container memory so this may go away in the future.

App constraints

The application must pull the port to use from the PORT environment variable.

An example Scotty app:

main :: IO ()
main = do
    putStrLn "Starting server..."
    port <- lookupEnv "PORT"
    scotty (maybe 3000 read port) $ do
        WebApp.routes

See here for source code of an example app deployed to PWS.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages