An Ember-CLI addon for lightening fast deployment of applications
This addon was inspired by Luke Melia's RailsConf 2014 presentation - Lightning Fast Deployment of Your Rails-backed JavaScript app.
This plugin is designed to aid in the deployment workflow of an Ember CLI application. The workflow is designed to follow on from a successful ember build
command and runs as follows:
- Create an Ember CLI build
- Deploy assets to S3
- Deploy index.html to Redis
- (At some point afterwards) Activate a released index.html to be the current live version
From within your Ember CLI application, run:
npm install --save-dev ember-cli-deploy
Any of the command line options passed in to the following commands can alternatively be either exported as environment variables or specified in a .env
file.
Simply change the option flag to be UPPERCASED
and UNDER_SCORED
, eg:
--redis-host
would be specified as REDIS_HOST
This command is responsible for pushing your assets to an S3 bucket.
ember deploy:assets <options>
Default: dist
Should point to the dist
directory that contains the built assets.
The access token that has permission to push to your S3 bucket.
The token secret that belongs to the s3-access-key-id
.
The S3 bucket to push assets to.
Default: us-east-1
The region that your S3 bucket sits in.
This command is responsible for pushing your index.html file to a Redis instance.
ember deploy:index <options>
Default: dist
Should point to the dist directory that contains the built index.html.
The host server of the Redis instance to deploy the index.html to.
The host port of the Redis instance to deploy the index.html to.
Default: null
The password of the Redis instance to deploy the index.html to.
This command is responsible for activating a deployed index.html file. The process of activating the index.html file will update the index:current
entry in Redis to be the index.html file for the specified <key>
.
ember activate <key> <options>
This should be the short commit hash for the a previously deployed index.html file.
The host server of the Redis instance to deploy the index.html to.
The host port of the Redis instance to deploy the index.html to.
Default: null
The password of the Redis instance to deploy the index.html to.
To run the tests, run:
npm test
The following sites have contributed in some way, shape or form in the creation of this addon.
- Framework agnostic, fast zero-downtime Javascript app deployment
- Lightning Fast Deployments With Rails (in the Wild).
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality.
- Aaron Chambers ([email protected])