Usage: Heroku

Sergio Tapia edited this page Jan 28, 2017 · 2 revisions

This guide is out of date, please ignore for now.

Run it on Heroku

To run it on Heroku, you need to:

Create the Heroku application using the Elixir build pack.

$ heroku create --buildpack "https://github.com/HashNuke/heroku-buildpack-elixir.git"
Creating mysterious-meadow-6277... done, stack is cedar-14
Buildpack set. Next release on mysterious-meadow-6277 will use https://github.com/HashNuke/heroku-buildpack-elixir.git.
https://mysterious-meadow-6277.herokuapp.com/ | https://git.heroku.com/mysterious-meadow-6277.git
Git remote heroku added

Add the Phoenix static buildpack to the same Heroku project.

$ heroku buildpacks:add https://github.com/gjaldon/heroku-buildpack-phoenix-static.git

Generate a secret key for the project:

$ mix phoenix.gen.secret
xvafzY4y01jYuzLm3ecJqo008dVnU3CN4f+MamNd1Zue4pXvfvUjbiXT8akaIF53

Add the following environment variables, including the previously generated key:

POOL_SIZE=18
DATABASE_URL=foobarbaz
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
SECRET_KEY_BASE=xvafzY4y01jYuzLm3ecJqo008dVnU3CN4f+MamNd1Zue4pXvfvUjbiXT8akaIF53
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.