by anderslime


Phoenix Static Buildpack


This buildpack is meant to be used with the Heroku Buildpack for Elixir. When deploying Phoenix apps to Heroku, static assets will need to be compiled. This buildpack sees to it that static assets are compiled and that a corresponding asset manifest is generated.


  • Works much like the Heroku Buildpack for Elixir!
  • Easy configuration with phoenix_static_buildpack.config file
  • Automatically sets DATABASE_URL and includes heroku-postgresql:hobby-dev addon
  • If your app doesn't have a Procfile, default web task mix phoenix.server will be run
  • Can configure versions for Node and NPM
  • Auto-installs Bower deps if bower.json is in your app's root path
  • Caches Node, NPM modules and Bower components


# Set the buildpack for your Heroku app
heroku buildpacks:set

# Add this buildpack after the Elixir buildpack
heroku buildpacks:add --index 1


Create a phoenix_static_buildpack.config file in your app's root dir if you want to override the defaults. The file's syntax is bash.

If you don't specify a config option, then the default option from the buildpack's phoenix_static_buildpack.config file will be used.

Here's a full config file with all available options:

# We can set the version of Node to use for the app here

# We can set the version of NPM to use for the app here

# Add the config vars you want to be exported here