New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploying Ember to GH Pages / Rails to Heroku: my notes #330

Closed
rhjones opened this Issue Nov 9, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@rhjones

rhjones commented Nov 9, 2016

Hi all,

I've shared these with a handful of people, but in case it helps anyone else—here's how I deployed Ember to GH pages & Rails to Heroku:

First, watch out for three issues w/the Ember deployment guide:

  • ga-wdi-boston/ember-deployment-guide#5
  • based on how the current Ember template is set up, you need to set ENV.rootURL, not ENV.baseURL, in your config settings
  • ENV.rootURL for production environment should point to /repo-name, not to /

Heroku/Rails:

  • heroku create
  • git push heroku master
  • heroku run rake db:migrate
  • heroku run rake db:seed
  • heroku config:set SECRET_KEY_BASE=$(rake secret)
  • heroku config:set SECRET_TOKEN=$(rake secret)
  • heroku config:set CLIENT_ORIGIN=https://yourgithubname.github.io
  • heroku apps:rename newname (optional)
  • heroku restart
  • heroku open

GH pages/Ember:

  • update config/environment.js according to deployment guide
    • make sure the name of the root/base url variable matches across dev & prod environments
    • add rootURL to production
    • add apiHost to production
    • sample:
      • ENV.rootURL = '/quiltr';
      • ENV.apiHost = 'https://quiltr.herokuapp.com';
  • update application/adapter and ajax files according to deployment guide
  • git checkout -b gh-pages
  • Remove /dist from .gitignore by adding a '#' before it. (do the same for ~/.gitignore)
  • Add & commit .gitignore
  • ember build --environment=production
  • git status
  • add changed files (should be what's in dist/) and commit
  • git subtree push --prefix dist origin gh-pages
@jrhorn424

This comment has been minimized.

Show comment
Hide comment
@jrhorn424

jrhorn424 Nov 9, 2016

Member

Please leave this open for now. Where these notes identify issues that should be addressed, they need to be filed in their appropriate repos.

If you'd like to talk about this issue with respect to your own deployment, please open another issue and reference this one.

Member

jrhorn424 commented Nov 9, 2016

Please leave this open for now. Where these notes identify issues that should be addressed, they need to be filed in their appropriate repos.

If you'd like to talk about this issue with respect to your own deployment, please open another issue and reference this one.

@ga-wdi-boston ga-wdi-boston locked and limited conversation to collaborators Nov 9, 2016

@raq929

This comment has been minimized.

Show comment
Hide comment
@raq929

raq929 Mar 24, 2017

Contributor

I believe these have mostly been addressed by https://github.com/ga-wdi-boston/ember-deployment-guide

Contributor

raq929 commented Mar 24, 2017

I believe these have mostly been addressed by https://github.com/ga-wdi-boston/ember-deployment-guide

@jrhorn424

This comment has been minimized.

Show comment
Hide comment
@jrhorn424

jrhorn424 Mar 27, 2017

Member

Agreed! Thanks so much @rhjones.

Member

jrhorn424 commented Mar 27, 2017

Agreed! Thanks so much @rhjones.

@jrhorn424 jrhorn424 closed this Mar 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.