kittoframework / kitto

Kitto is a framework for interactive dashboards written in Elixir
http://kitto.io/dashboards/sample
MIT License
955 stars 58 forks source link

Additional Heroku Steps Needed on Default New Kitto Install #56

Closed cforcey closed 7 years ago

cforcey commented 7 years ago

Thanks so much for this super fun dashboard application with great installation instructions, a demo app, and tons of useful widgets. It is a terrific first useful elixir project for those of us getting used to the deployment and other aspects of the language. Thank you!

In following the Heroku instructions, I ran into some errors that were easy to clean up (I think!) but required a few additional steps that are clear in the demo app but might catch up folks following the Heroku instructions on the Wiki - https://github.com/kittoframework/kitto/wiki/Deploying-to-Heroku.

I have tried to capture the additional steps I took to get it running in this gist in case that makes updating the docs easier for you -- or I hope to be told a better way to accomplish this with the stock install files.

https://gist.github.com/cforcey/7ac218e34384b3383350b09abcc9ca15

Thanks again for this super fun application and all the extra time you took to make it plug and play for all of us following in your footsteps.

zorbash commented 7 years ago

Thanks @cforcey your encouraging words match my aspirations for this project :blush:

I added a link to your gist on https://github.com/kittoframework/kitto/wiki/Deploying-to-Heroku

The current (to be released in 0.3.0) installer contains changes mentioned in your gist though. See:

https://github.com/kittoframework/kitto/blob/7ec1c22bb80a29be4e9a592471e9faaff601b669/installer/templates/new/elixir_buildpack.config

https://github.com/kittoframework/kitto/blob/7ec1c22bb80a29be4e9a592471e9faaff601b669/installer/templates/new/package.json

https://github.com/kittoframework/kitto/blob/7ec1c22bb80a29be4e9a592471e9faaff601b669/installer/templates/new/Procfile

The only difference I see is that you're also setting the Erlang version in the buildpack config but I don't think it's necessary. Did your Heroku deployment fail without it?

cforcey commented 7 years ago

Great to be in touch and to hear that the 3.0 installer will bring all this goodness to the default setup. I looked around issues, but should have thought to look at the new branches for upcoming adjustments before bothering you with the gist.

Great that the gist is linked and feel free to copy anything verbatim without attribution into your original document if it remains useful after 3.0 of course! I don't expect anything will be needed, but would have normally done a pull request if this was code and not a wiki to try to contribute in some small way to your efforts.

As for the Erlang reference, I debated that since the deploy succeeded in both cases and the app ran fine on either version of Erlang. My home brew environment has me at Erlang 19.1, while the build pack with just the elixir version specified settled at Erlang 18.3.4. I am quite sure this make no difference at all, but I was looking for as few gaps between dev and prod as possible. :)

heroku deploy messages without erlang locked at 19.1, but elixir specified at 1.3.4

remote: -----> Elixir app detected
remote: -----> Checking Erlang and Elixir versions
remote:        Will use the following versions:
remote:        * Stack cedar-14
remote:        * Erlang 18.3
remote:        * Elixir 1.3.4
remote:        Will export the following config vars:
remote:        * Config vars DATABASE_URL
remote:        * MIX_ENV=prod
remote: -----> Fetching Erlang 18.3
remote: -----> Installing Erlang 18.3 (changed)
remote:
remote: -----> Using cached Elixir v1.3.4
remote: -----> Installing Elixir v1.3.4

heroku deploy messages with erlang locked at 19.1 and elixir specified at 1.3.4

remote: -----> Elixir app detected
remote: -----> Checking Erlang and Elixir versions
remote:        Will use the following versions:
remote:        * Stack cedar-14
remote:        * Erlang 19.1
remote:        * Elixir 1.3.4
remote:        Will export the following config vars:
remote:        * Config vars DATABASE_URL
remote:        * MIX_ENV=prod
remote: -----> Fetching Erlang 19.1
remote: -----> Installing Erlang 19.1 (changed)
remote:
remote: -----> Using cached Elixir v1.3.4
remote: -----> Installing Elixir v1.3.4

Again, pretty sure this is irrelevant to the functioning of the app and as far as your files go might cause trouble to specify the latest Erlang if folks are happy on 18.3. Best wishes and looking forward to 3.0. Appreciate the direct links to the new files so I can compare them to what I have know and improve. Thanks too for the fast reply!

zorbash commented 7 years ago

Thanks again for reporting this and authoring the gist with the additional steps.