This plugin handles interactions with Navis and is intended for use as part of the ember-cli-deploy-navis-pack.
From the root of your ember application's repository:
ember install git+ssh://github.com/AgilionApps/ember-deploy-navis.git
Assumes ember-cli-deploy-git-info is installed as well.
To deploy to Navis you will need two pieces of information from Navis:
- Your Navis.io
appKey
. This is available on the view application screen. TheappKey
is unique per application, per environment. - Your Navis.io deploy credentials, the
userKey
anduserSecret
. These are available on your profile page. Your user credentials are used for all Navis apps.
You will typically want to export your user credentials as environmental vars.
In ~/.zshrc
or ~/.bashrc
(or similar):
### Navis creds
export NAVIS_USER_KEY="<your-navis-deploy-key>"
export NAVIS_USER_SECRET="<your-navis-deploy-secret>"
You can now configure ember-cli-deploy.
Edit config/deploy.js
:
module.exports = function(environment) {
var DEPLOY = {
'navis': {
appKey: '[find-me-on-navis.io]', // Staging app key
userKey: process.env.NAVIS_USER_KEY,
userSecret: process.env.NAVIS_USER_SECRET,
uploadAssets: true //default
}
};
if (environment === 'production') {
DEPLOY['navis']['appKey'] = '[find-me-on-navis.io]';
}
return DEPLOY;
};
By default ember-deploy-navis will upload your assets to the navis asset host.
You can disable this behaviour by setting uploadAssets
to false
.
To take advantage of the assets you must prepend your navis asset host
path onto asset URLs. Add the following to ember-cli-build.js
or
Brocfile.js
:
var app = new EmberApp({
fingerprint: {
prepend: '//cdn.navis.io/<your app_key>/'
}
});
You are now ready to deploy!
Available commands:
ember deploy:list
to see the list of existing buildsember deploy
to deploy your application for developmentember deploy --environment production
to deploy your application for productionember deploy:activate --revision <VERSION>
to activate a specific revision
In a new directory (not an ember application's directory);
git clone [email protected]:AgilionApps/ember-deploy-navis.git
npm install && bower install
In this addon's directory:
npm link
In an ember application's directory:
npm link ember-deploy-navis
If you find it simpler, you can now work on this addon from
within the ember application at
node_modules/ember-deploy-navis
. The application is aliasing
the addon's directory, so changes made to the addon from
within your application will immediately be available.