Specifying Elixir version

Use prebuilt Elixir branch, the branch specifier ensures that it will be downloaded every time

elixir_version=(branch master)

Specifying Erlang version

You can specify an Erlang release version like below

erlang_version=17.5

Specifying config vars to export at compile time

To set a config var on your heroku node you can exec from the shell:

heroku config:set MY_VAR=the_value

Add the config vars you want to be exported in your elixir_buildpack.config file:

config_vars_to_export=(DATABASE_URL MY_VAR)

Other notes

Add your own Procfile to your application, else the default web task mix run --no-halt will be used.

If you create an application with this buildpack, then a free database addon heroku-postgresql:hobby-dev is also added. The database credentials are available from the env var DATABASE_URL.

Your application should build embedded and start permanent. Build embedded will consolidate protocols for a performance boost, start permanent will ensure that Heroku restarts your application if it crashes. See below for an example of how to use these features in your Mix project: