A heroku buildpack for Meteor v1.3+.
NOTE: previous versious of this buildpack used Compose (aka MongoHQ) which no longer offers a free tier to heroku users. If you still need MongoHQ, use the MongoHQ branch.
To use this with your meteor app and heroku:
-
Set up your app to deploy to heroku with git.
-
Set this repository as the buildpack URL:
heroku buildpacks:set https://github.com/michaltakac/meteor-buildpack-horse.git
-
Add the MongoLab addon:
heroku addons:create mongolab
-
If it isn't set already, be sure to set the
ROOT_URL
for meteor (replace URL with whatever is appropriate):heroku config:set ROOT_URL=https://<yourapp>.herokuapp.com
Optional step, if you are using a settings.json
file to configure your Meteor application
% heroku config:add METEOR_SETTINGS="$(cat settings.json)"
Once that's done, you can deploy your app using this build pack any time by pushing to heroku:
git push heroku master
The basic buildpack should function correctly for any normal-ish meteor app, with or without npm-container. For extra steps needed for your particular build, just add shell scripts to the "extras" folder and they will get sourced into the build.
Extras included in this branch:
mongolab.sh
: SetMONGO_URL
to the value ofMONGOLAB_URI
.phantomjs.sh
: Include phantomjs for use withspiderable
.
This buildpack creates a directory .meteor/heroku_build
($COMPILE_DIR
)
inside the app checkout, and puts all the binaries and the built app in there.
So it ends up having the usual unixy bin/
, lib/
, share
etc
subdirectories. Those directories are added to $PATH
and
$LD_LIBRARY_PATH
appropriately.
So $COMPILE_DIR/bin
etc are great places to put any extra binaries or stuff
if you need to in custom extras.
Meteor is under active developement, recent changes in its core broke support for certain meteor packages designed to access their own assets at first run. The issue has been reported on meteor/meteor#2606, but it may take a while to have it fixed. In the meanwhile you can circumvent the problem by setting the following variable in your Heroku Config Vars:
BUILDPACK_PRELAUNCH_METEOR
There are a gazillian forks and branches of various buildpacks remixing the words "heroku", "buildpack", and "meteor", many of which are abandoned or outdated or broken, and it's really hard to keep them straight.
So this one is the horse one.