You can easily deploy your Ember CLI application to a number of places.
Prerequistes:
Change directories to your Ember CLI application’s. Now, create your new Heroku application with the Ember CLI buildpack…
heroku create <OPTIONAL_APP_NAME> --buildpack https://github.com/tonycoco/heroku-buildpack-ember-cli.git
You should be able to now deploy your Ember CLI application with Heroku’s git hooks…
git commit -am "Empty commit for Heroku deployment" --allow-empty
git push heroku master
Need to make a custom nginx configuration change? No problem. In your Ember CLI application, add a config/nginx.conf.erb
file. You can copy the existing configuration file and make your changes to it.
If you are deploying the app to somewhere other than the root URL (/
),
you will need to configure the value of baseUrl
in config/environment.js
.
For example
1 // config/environment.js
2 if (environment === 'production') {
3 ENV.baseURL = '/path/to/ember/app/';
This value is used to set the value of base
in index.html
, e.g. <base href="/path/to/ember/app/" />
,
as this is required for the History API,
and thus also the Router, to function correctly.
To enable the Content Security Policy on your production stack, you’ll need to copy the
Content-Security-Policy
and X-Content-Security-Policy
(for IE) from the headers generated
by ember serve
. If you’d like to enable it in report-only mode, use Content-Security-Policy-Report-Only
and X-Content-Security-Policy-Report-Only
. Make sure you’ve set a report-uri
if you enable
the CSP in report-only mode.