Skip to content
Andrew Smith edited this page Feb 3, 2015 · 5 revisions

Heroku

Archivr currently deploys to Heroku.

The Heroku app is managed by Andrew Smith.

Deployment branch

Heroku deploys from the develop branch. TODO: this is not proper form. Normally, production environment should deploy from master, as per the git flow branching model.

Buildpacks

Archivr uses the multipack buildpack, because our application requires Ruby for SASS compiling, Node for the app, and Phantom for screenshot capturing.

These buildpacks are defined in the root-level .buildpacks file, which is read by Heroku.

Installing dependencies

Heroku runs npm install --production when you push to deploy. Archivr requires gulp to build artifacts for deployment (minified files, processed views, etc.). Thus, gulp and any other dependencies used in the build process must be moved to the dependencies section of package.json instead of devDependencies.

Building the deployment artifact

This script will run after npm install:

./node_modules/bower/bin/bower install && node node_modules/.bin/gulp build

This installs bower components, then runs gulp build. In the Heroku environment, with NODE_ENV set, gulp build will delegate to the appropriate build environment. It defaults to 'development' if no environment is set, making it safe for local builds without explicitly defining NODE_ENV.

Clone this wiki locally