-
Notifications
You must be signed in to change notification settings - Fork 2
11.0.0 Build and Deploy To Heroku
bazzel edited this page Nov 1, 2014
·
7 revisions
- Build and deploy the application to Heroku
See the installation instructions. Use tag 11.0.0. You also need to have an account with Heroku and have the Heroku Toolbelt for deploying the application.
This step is optional, you can instead connect to a different backend we've set up when deploying the front end.
- In the terminal, enter
heroku auth:login
. - Enter your email and password.
- Enter
heroku create
(orheroku create [be-name]
if want don't want Heroku to come up with a name) - Remember the name of the app that Heroku returns:
Creating gentle-forest-1234... done, stack is cedar
https://gentle-forest-1234.herokuapp.com/ | [email protected]:gentle-forest-1234.git
Deploy to Heroku by pushing only the backend
folder (Heroku expect the application to be at the root):
heroku git:remote -a [be-name, e.g. gentle-forest-1234]
git subtree push --prefix backend heroku master
heroku run rake db:migrate
heroku run rake db:seed
- Visit https://[be-name].herokuapp.com/api/products.json to check if the deployment was successful.
- Enter
heroku create --buildpack https://github.com/tonycoco/heroku-buildpack-ember-cli.git
(orheroku create [fe-name] --buildpack https://github.com/tonycoco/heroku-buildpack-ember-cli.git
if want don't want Heroku to come up with a name). - Remember the name of the app that Heroku returns:
Creating quiet-woodland-6789... done, stack is cedar
BUILDPACK_URL=https://github.com/tonycoco/heroku-buildpack-ember-cli.git
https://quiet-woodland-6789.herokuapp.com/ | [email protected]:quiet-woodland-6789.git
- Deploy to Heroku by pushing only the
frontend
folder (Heroku expect the application to be at the root):
heroku git:remote -a [fe-name, e.g. quiet-woodland-8703]
git subtree push --prefix frontend heroku master
- To connect to the proper backend, you set the
API_URL
config variable. If you deployed the backend in the previous paragraph use this, otherwise you can connect to a backend we've set up for you (https://ember-workshop-backend.herokuapp.com):
heroku config:set API_URL=https://[be-name].herokuapp.com
heroku apps:open