This is old, use this instead https://github.com/ember-cli/ember-cli-deploy
A very specific command line script to build an Ember app, push it to S3, and update redis with the "index.html" contents.
dotenv loads and environment file based on the --environment
option. It should contain REDIS_URL, S3_BUCKET_NAME and AWS credentials required by aws s3 sync.
Keep an eye on ember-cli/ember-cli#1256 to see if something better comes along.
npm install --save-dev ember-s3-redis-deploy
# adds the key 'photos-cms-client-app/canary/index.html'
# with the contents on 'app/index.html' to redis
ember-s3-redis-deploy --environment production --release stable
In the server app use the buildReleaseKey
convenience function to construct the key name saved in redis.
var buildReleaseKey = require('ember-s3-redis-deploy').buildReleaseKey;
/*
* Omitted server code
*/
app.get('/', function (request, response) {
// opionally allow for loading different releases
// i.e. example.com?release=beta
var release = request.query.release || 'stable';
var key = buildReleaseKey({
appName: 'my-ember-app-name',
release: release
});
var html = redisClient.get(key, function (html) {
response.send(html);
});
});