-
Notifications
You must be signed in to change notification settings - Fork 9
Deployment
Archivr currently deploys to Heroku.
- Development - local
- Production - Heroku
The Heroku app is managed by Andrew Smith.
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.
Archivr uses the multipack buildpack, because our application requires Ruby for SASS compiling, Node for the app, and Phantom for screenshot capturing.
- Ruby: https://github.com/heroku/heroku-buildpack-ruby
- Node: https://github.com/heroku/heroku-buildpack-nodejs
- Phantom: https://github.com/stomita/heroku-buildpack-phantomjs.git
These buildpacks are defined in the root-level .buildpacks
file, which is read by Heroku.
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
.
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
.