The New Meteor Build Image
Better Meteor support has been something that our customers have requested for quite some time. We, at Modulus, have always seen the Meteor community as an essential part of Modulus. We have strived to provide great support for our Meteor customers by first introducing `demeteorizer`. We continue these efforts by introducing the new Meteor Runtime. While this is still a beta feature, we are always open to feedback and pull requests.
There are some requirements to use the new Meteor runtime. If you plan on using the Modulus CLI, you can install the CLI with the `next` or `6.0.0` tags. If you already have the CLI installed, you will want to update to `email@example.com` or `modulus@next`.
$ # To install the Modulus CLI $ npm install -g modulus@next $ # To update the Modulus CLI $ npm update -g modulus@next
Lastly, your application must be running Meteor version 1.3 or later. Our build scripts utilize features of Meteor that require 1.3 or greater. There are two ways to check the version of Meteor that an app is using.
$ # Check the /path/to/source/.meteor/release file $ cat /path/to/source/.meteor/release $ # Run meteor - -version command in project root directory $ cd /path/to/source && meteor --version
The uploaded bundle must contain a `.meteor` directory. This is required by Meteor to build your application to a Node.js project. You can see the files in the root of your source code by using the `tree` command.
$ # Ensure `.meteor` directory exists in the root directory of your application $ tree -a -L 2 # List all files and go 2 levels deeps ├── .meteor │ ├── .finished-upgraders │ ├── .gitignore │ ├── .id │ ├── cordova-plugins │ ├── local │ ├── packages │ ├── platforms │ ├── release │ └── versions ├── leaderboard.css ├── leaderboard.html └── leaderboard.js
How It Works
If a `package.json` is located in the root directory of your source we install any dependencies when your bundle is uploaded to our build servers. When this is completed, we `demeteorize` your application to turn it into a Node.js project. Once these steps are completed, we simply upload this new build to our storage servers so they can be provisioned to your servos.
The `meteor build` command in `demeteorizer` takes the most time to complete. This may vary depending on the size of the uploaded Meteor project. The bigger the project, the longer the build will take to complete. As some builds may be long, this helps in the long run with scaling, stopping, and starting your application.
As noted before, our build and run images for Meteor are still in beta. We will continue to improve our runtime images. Both the build and run images are open source and available on GitHub and Docker Hub.