Deploy ember-cli + rails app in heroku? -
has deployed ember-cli + rails app in heroku one? https://github.com/bostonember/website if yes, how did/do deploy?
i know ember-cli produces necessary code in dist/ dir, should placed (copied) under rails' public/ directory not sure how , when given heroku not allow write access in filesystem. if has done that, let me know :)
the reason chose ember-cli instead of ember-rails gem don't want dependent on rails' gem developer. think ember-cli option long can deploy efficiently in heroku :d
dockyard worked through example of during boston ember meetup. here's video.
they posted code online, important part being deploy task of rakefile:
task :deploy sh 'git checkout production' sh 'git merge rails-served-html -m "merging master deployment"' sh 'rm -rf backend/public/assets' sh 'cd frontend && broccoli_env=production broccoli build ../backend/public/assets && cd ..' unless `git status` =~ /nothing commit, working directory clean/ sh 'git add -a' sh 'git commit -m "asset compilation deployment"' end sh 'git subtree push -p backend heroku master' sh 'git checkout -' end
essentially, copy dist
ember-cli
directly rails public folder, deploy rails subfolder rails app heroku using subtree. i've done myself, , works well.
note approach in "lightening fast deployments" blog post @exa linked better, since can change ember app without touching or redploying rails app.
Comments
Post a Comment