Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Elixir buildpack for Heroku.

branch: master

Merge pull request #10 from edgurgel/patch-1

Get dependencies on prod environment too
latest commit 045369f780
Gosha Arinich authored December 14, 2013
Octocat-spinner-32 bin Get dependencies on prod environment too December 14, 2013
Octocat-spinner-32 opt Update version of Rebar July 23, 2013
Octocat-spinner-32 another Mix url fix September 16, 2013

Heroku buildpack: Elixir

This is a Heroku buildpack for Elixir apps. It uses Mix.

Configure your Heroku App

$ heroku config:add BUILDPACK_URL="" -a YOUR_APP


$ heroku create --buildpack ""

Select an Erlang version

The Erlang/OTP release version that will be used to build and run your application is now sourced from a dotfile called .preferred_otp_version. It needs to be the branch or tag name from the repository, and further, needs to be one of the versions that precompiled binaries are available for.

Currently supported OTP versions:

  • master (R15B02 pre)
  • master-pu (R16B pre)
  • OTP_R15B
  • OTP_R15B01
  • OTP_R15B02

To select the version for your app:

$ echo OTP_R15B02 > .preferred_otp_version
$ git commit "Select R15B02 as preferred OTP version" .preferred_otp_version

If no version is explicitly specified, master will be used.

Elixir version

The application will be compiled and run using Elixir master ( at the time) and Mix.

You can specify custom branch or tag name from the repository in the .preferred_elixir_version dotfile.

Setup a Procfile

Heroku needs a Procfile in order to run your application. Create a Procfile with a web process defined:

$ echo 'web: mix server -p $PORT' > Procfile

The buildpack sets MIX_ENV=prod so you don't have to.

Important Note: Single quotes are important here. $PORT is an environment variable supplied by Heroku. If you use double quotes in the above echo call, your local shell will try to interpolate the contents, and you'll end up with -p and not -p $PORT.


heroku-elixir-buildpack supports only applications which use Mix to manage dependencies.

Build your Heroku App

$ git push heroku master

You may need to write a new commit and push if your code was already up to date.

Something went wrong with that request. Please try again.