-
Notifications
You must be signed in to change notification settings - Fork 58
[Deployment] Heroku
You can have a look at the demo dashboard code deployed at Heroku at https://kitto.herokuapp.com
A dashboard generated via mix kitto.new <dashboard_name>
creates all files necessary to deploy to Heroku.
Use heroku-buildpack-elixir to manage Elixir/OTP installation, mix dependencies and compilation.
From the root of your dashboard source code run:
heroku create --buildpack "https://github.com/HashNuke/heroku-buildpack-elixir.git"
Given you're using git for your dashboard, this command will create a
heroku
remote
Nodejs is required for the js/scss files to be compiled by webpack.
heroku buildpacks:add heroku/nodejs
Then you'll see:
Buildpack added. Next release on your-dashboard-name will use:
1. https://github.com/HashNuke/heroku-buildpack-elixir.git
2. heroku/nodejs
More info about deploying with git: https://devcenter.heroku.com/articles/git
# File: config/prod.exs
config :kitto,
ip: {0, 0, 0, 0},
port: {:system, "PORT"} # set by Heroku
# File: config/prod.exs
config :kitto,
watch_assets?: false,
serve_assets: true,
assets_path: "priv/static"
git push heroku master
..and you're up and running!
Note If you generated your dashboard app using an installer prior to the 0.3.0 release, you also have to follow some additional steps (contributed by @cforcey).