Skip to content

Meta Heroku Buildpack for Deploying Ember.js Applications on Heroku

Notifications You must be signed in to change notification settings

Latermedia/heroku-buildpack-emberjs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

heroku-buildpack-emberjs

NOTE: This buildpack is an experimental OSS project demonstrating Ember.js on Heroku.

Intro

This is a Heroku Buildpack for Ember.js and ember-cli-fastboot applications.

Usage

This buildpack has a binary component, so it needs to be compiled beforehand. It's easier just to use the buildpack with the prebuilt binary.

$ heroku buildpacks:set https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/emberjs.tgz

Once the buildpack is set, you can git push heroku master like any other Heroku application.

EmberJS

Deploying a standard ember.js app on Heroku is simple. You can run the following commands to get started.

$ heroku create
$ heroku buildpacks:set https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/emberjs.tgz
$ git push heroku master
$ heroku open

Fastboot

Deploying an ember fastboot on Heroku is just as simple. You can run the following commands to get started.

$ heroku create
$ heroku buildpacks:set https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/emberjs.tgz
$ git push heroku master
$ heroku open

Problems

If you get an error setting the buildpack like the following:

$ heroku buildpacks:set https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/emberjs.tgz
▸ Invalid buildpack `heroku/emberjs`

This means that npm is having issues keeping the core heroku toolbelt plugins up to date. To fix this you can run these commands:

$ rm -rf ~/.heroku/node_modules/heroku-apps
$ heroku update

This causes the core plugins to be redownloaded with the latest version.

Architecture

The buildpack is built on top of three other buildpacks, to deliver a great Ember experience.

With the Node.js buildpack, you can rely on Heroku's first class support for node and npm. This allows the buildpack to install and setup the ember-cli toolchain as well as run the ember-fastboot-server as if it was any other Node.js application on the platform.

The ember-cli-deploy buildpack requires the ember app to be using ember-cli. In addition, you can customize your build on Heroku by using the ember-cli-deploy build pipeline. Fastboot is supported out of the box. The buildpack will build the assets, install any fastboot dependencies, and setup a default web process type to get you going quickly.

When not using fastboot, the static buildpack uses nginx to efficiently serve static assets while also handling HTML5 pushState, proxying, and other common frontend hosting configurations.

Contributing

The buildpack builds a CLI tool generically named, buildpack built on top of mruby-cli. It resides in the buildpack/ directory. buildpack is a CLI binary that has 3 subcommands that correspond to the Buildpack API:

  • detect
  • compile
  • release

Running Tests

First, you'll need the mruby-cli prerequisites setup. Once inside the buildpack/ directory:

$ docker-compose run mtest && docker-compose run bintest

About

Meta Heroku Buildpack for Deploying Ember.js Applications on Heroku

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 93.3%
  • Dockerfile 2.5%
  • C 2.5%
  • Shell 1.7%