Skip to content

cklist ember deploy

EricLScace edited this page Jul 18, 2017 · 3 revisions

Ember deployment checklist

  • Run npm install to verify all dependencies are up-to-date.
  • Run bower install to verify all dependencies are up-to-date.
  • Use project find to verify all names were consistently changed from the template name (e.g., ember-template) to the name of the client.
  • Set client to point to server as follows:
  • Update config/environment.js to insert name of client
  • Make sure the apiHost: 'http://localhost:3000/', is present.

module.exports = function(environment) { // next line must be 'var ENV =...' var ENV = { modulePrefix: '<% NAME OF YOUR CLIENT will be here %>', environment: environment, rootURL: '/', locationType: 'auto', apiHost: 'http://localhost:3000/', EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. 'with-controller': true } }, ... ```

  • Further down in the same file, define rootURL (Note that rootURL is NOT camelcase. For example, rootUrl will not work.) E.g., /allthemats-ember.
  • Also define apiHost:
  if (environment === 'production') {
  ENV.rootURL = '/<name-of-git-repo>';
  ENV.locationType = 'hash';
  ENV.apiHost = '<% replace with the URL to your deployed API %>';
  }
> ```

- [ ] Set `adapters/application.js` to import the apiHost link:

```js
import ActiveModelAdapter from 'active-model-adapter';
import ENV from '<%name of client%>/config/environment';

export default ActiveModelAdapter.extend({
  host: ENV.apiHost,
  ...
  ...
  ...
});
  • if there is a services/ember-ajax file:
  import AjaxService from 'services/ember-ajax';
import ENV from '<%name of client%>/config/environment';

export default AjaxService.extend({
  host: ENV.apiHost,
  ...
  ...
  ...
});
  • Make sure all work is committed and working on your master branch.
  • Create a gh-pages branch locally via git checkout -b gh-pages. DO NOT PUSH TO GH-PAGES YET
  • Remove /dist from .gitignore by adding a # before it.
  • Add and commit this change: git add dist/.
  • Run ember build --environment=production.
  • Run git status and add all files changed (mainly dist/) and some other changes; then commit all changes.
  • Use subtree push to create a new gh-pages branch on GitHub composed only of the dist directory by using: git subtree push --prefix dist origin gh-pages
  • Go check to your github page site and ensure all requests are working and appear the same as on localhost:4200.
Clone this wiki locally