Version
- Getting started
- Overview
- Installation
- Quickstart
- Upgrading
- Setting up your pipeline
- Determining needs
- Using Plugins
- Deploying your app
- Plugin Packs
- Authoring Plugins
- Creating a plugin
- Pipeline hooks
- The deployment context
- Creating a plugin pack
- Creating in-repo plugins
- Cookbook
- Default options
- Using .env for secrets
- Including a plugin twice
- Development workflow
- The lightning strategy
- S3 walkthrough
- Deploy non-Ember apps
- Reference
- Usage
- Configuration
- Other API/Classes
The Lightning Strategy
The philosphy and approach of this strategy is explained in this video from RailsConf 2014. The Rails back-end is not essential to the overall strategy, so you can get the idea even if your backend is in a different language.
End-to-end Example
Ember Deploy Demo
demonstrates a complete Ember CLI Deploy setup.
It uses:
ember-cli-deploy-lightning-pack
plugin pack as baseember-cli-deploy-ssh-tunnel
to connect to the Redis instance on the server- The development workflow
- A Ruby on Rails backend that serves the app (fetching from Redis example)
You can take inspiration from these files:
Example Sinatra app
This is a small Sinatra application, that can be used to serve an Ember CLI application deployed with ember-cli-deploy-lightning-pack
.
require 'sinatra'
require 'redis'
get '/' do
content_type 'text/html'
redis = Redis.new
project = '<your-project-name>'
index_key = params[:index_key] || redis.get("#{project}:index:current")
redis.get("#{project}:index:#{index_key}")
end
The nice thing about this is that you can deploy your application to production, test it out by passing an index_key
parameter with the revision you want to test and activate when you feel confident that everything is working as expected.
ember-cli-deploy-rack
Alternatively, you can use ember-cli-deploy-rack
, which bundles the described functionality in the Sinatra application as a gem.
Example Node apps
Using Koa
This app does the same as the Sinatra app above, it supports the same index_key query param. It should help you to get up and running in seconds and dont worry about server code. This needs your Ember-CLI app to be deployed with ember-cli-deploy-lightning-pack
.
Nodejs example with one click Heroku deploy!
Using ExpressJS
This app is very similar to the Sinatra app above but also implements a very simple /revisions
endpoint where you can see all current revisions available to use. It is implemented using Express so should be very easy to follow. This needs your Ember-CLI app to be deployed with ember-cli-deploy-lightning-pack
.
Azure Tables Server apps
- C#-based, https://gist.github.com/duizendnegen/85b5c4a7b7eef28f0756
- Node.js-based, node-ember-cli-deploy-azure-tables courtesy of jamesdixon
Example Flask app
This app does the same as the Sinatra app above, it supports the same index_key query param. It should help you to get up and running in seconds and dont worry about server code. This needs your Ember-CLI app to be deployed with ember-cli-deploy-lightning-pack
. It is heavily influenced by the ember-lightning
NodeJS server, above; but written in Flask for our python-heavy development team.