Fetching contributors…
Cannot retrieve contributors at this time
95 lines (73 sloc) 2.76 KB

Heroku Buildpack: Revel

This is a Heroku buildpack for Revel.

Heroku-specific build tag

The buildpack adds a heroku build constraint, to enable heroku-specific code. See the App Engine build constraints article for more.



The buildpack requires a .godir file in the project root directory to tell it the import path to your Revel application. The contents of .godir should be exactly the argument to "revel run" when running the application.

Here is an example session.

$ pwd

$ echo "" > .godir

$ find . -type f

$ heroku create -b


Once the .godir and heroku remote are set up, deployment is a single command.

$ git push heroku master
-----> Fetching custom git buildpack... done
-----> Revel app detected
-----> Installing Go 1.1... done
       Installing Virtualenv... done
       Installing Mercurial... done
       Installing Bazaar... done
-----> Running: go get -tags heroku ./...
-----> Discovering process types
       Procfile declares types -> (none)
       Default types for Revel -> web

-----> Compiled slug size: 33.3MB
-----> Launching... done, v5 deployed to Heroku

The buildpack will detect your repository as Revel if it contains the conf/app.conf and conf/routes files.

It's possible to specify the revel mode by setting the REVEL_MODE environment variable. "prod" will be the default mode.

Dependencies and private repositories

If you want to use private repositories you just need to create Godeps folder with this command:

$ godep save ./...

and commit your changes:

$ git add -A . 
$ git commit -a -m "Dependencies"

Once the Godeps created and committed you can push your changes (deploy):

$ git push heroku master

Hacking on this Buildpack

To change this buildpack, fork it on GitHub. Push changes to your fork, then create a test app with --buildpack YOUR_GITHUB_GIT_URL and push to it. If you already have an existing app you may use heroku config:add BUILDPACK_URL=YOUR_GITHUB_GIT_URL instead of --buildpack.