Deploy the ember-cli + rails app in the hero?

Has anyone deployed the ember-cli + rails app in Heroku, like this one? https://github.com/bostonember/website If yes, how do you / deploy?

I know that ember-cli creates all the necessary code in dist / dir that needs to be placed (copied) under public / directory rails, but I'm not sure how and when to do it, given that Heroku does not allow any write access in its file system. Therefore, if someone has already done this, let me know :)

The reason I chose ember-cli instead of the ember-rails gem is because I don't want to depend on the developer of the gems in the rails. I think ember-cli is a good option, as long as I can use the hero effectively: D

+8
ruby-on-rails ember-cli heroku
source share
3 answers

The shipyard worked on an example of this during a meeting in Boston Amber. Here is the video .

They posted the code online, an important part of which is the task of deploying the rake file :

task :deploy do sh 'git checkout production' sh 'git merge rails-served-html -m "Merging master for deployment"' sh 'rm -rf backend/public/assets' sh 'cd frontend && BROCCOLI_ENV=production broccoli build ../backend/public/assets && cd ..' unless `git status` =~ /nothing to commit, working directory clean/ sh 'git add -A' sh 'git commit -m "Asset compilation for deployment"' end sh 'git subtree push -P backend heroku master' sh 'git checkout -' end 

Essentially, you copy the dist from ember-cli directly to the Rails shared folder, then expand the rails subfolder as the rails application in Heroku using the subtree. I did it myself and it works well.

Please note that the @ eXa Lightning Fast Deployment blog post approach is ultimately better since you can change your Ember app without touching or reconfiguring the Rails app.

+12
source share
+4
source share

https://github.com/tonycoco/heroku-buildpack-ember-cli for your Ember CLI application and the standard Rails application for the Rails application.

0
source share

All Articles