🎉 Checkout this project for a much simpler option (Meteor 1.4+) - https://github.com/talos-code/meteor-azure
CLI tool for deploying demeteorized meteor apps on Azure App Service.
NOTE: Windows only! While the CLI may work on Linux/Mac, the native modules Meteor requires must be compiled on a Windows machine for it to deploy successfuly on Azure. There is some investigation to moving this install process to Azure.
Meteor requires node v0.10.40 32bit to work. Check out nvm for a good tool to manage your node versions.
npm install -g christopheranderson/azure-demeteorizer
Using GitHub has the install source is temporary until the package reaches "beta"
- Install Meteor locally (>v0.8.1)- Install from Meteor.com
- Node v0.10.40 32bit - Use nvm to make node version manage easy
- Mongo accessibly to Azure - i.e. MongoDB on a VM or Mongo Lab
- App Service App with following App Settings:
- MONGO_URL - (Mongo DB connection string from a MongoDB hosted on Mongo Lab or a VM)
- ROOT_URL - http://{sitename}.azurewebsites.net or your custom domain if you've set that up
- WEBSITE_NODE_DEFAULT_VERSION - 0.10.40
- METEOR_SETTINGS - (Optional: Meteor app setting content from your settings.json)
- Python 2.7 - Required for node-gyp
- Microsoft Visual C++ Redistributable (2010 or greater)
- It may be required to configure npm to use a newer version of C++ if you don't have 2010 installed.
If you have any issues during the install phase, it's likely that you are either using the wrong node version or don't have the prerequisites installed. Please review the requirements on node-gyp's github page for Windows users.
If you have any issues after you've deployed, it's likely your node version is incorrect on the server.
There are 4 commands needed to deploy to Azure
- After installing the tool, navigate to the directory hosting your meteor app
azure-demeteorizer build
azure-demeteorizer install
azure-demeteorizer zip
azure-demeteorizer deploy -s [sitename] -u [username] - p [password]
- sitename: the name of your App Service App.
- username: username for your site's deployment credentials.
- password: password for your site's deployment credentials.
You should now be able to navigate to your site ({sitename}.azurewebsites.net) and see your application deployed now.
A couple of issues may arise while deploying:
- Credentials aren't working
- Go to the Azure Portal and reset your deployment credentials via any Web App. If you're still getting failures, turn local git deployment on and off. If you're still failing, open an issue.
- 500 Error during deployment - can't delete
fibers.node
- Fibers is currently locked by the node process. There is currently some work in progress to fix this, but the work around is to stop your site via the Azure Portal before deploying, and starting it again after deploying.
There are lots of good reasons to need a custom web.config, for instance, forcing HTTPS or redirecting to your custom domain.
To use a custom web.config, just pass the path during the install phase. Like so: azure-demeteorizer install -p ./path/to/web.config
If you add .demeteorized
to your .gitignore
(if you're using git), you can prevent the tool output from affecting your repository.
Meteor is a popular JavaScript App Platform. It's something Azure App Service had a lot of requests for on the Azure feedback site. Azure App Serivce doesn't have explicit support for meteor apps, but it does have support for node applications, which is what meteor is built around. Demeteorizer is an open source, community supported tool designed to unpackage meteor apps into a regular node app. This CLI tool wraps Demeteorizer and makes the steps to deploy to Azure very simple.
- Beta Release:
- Tests
- More configuration
- Streamline commands
- Yell at you when your App Service App is misconfigured (missing connection strings, etc.)
- Even more future:
- Enable CI: Remove need to run this tool on local box - allow it to run in a deploy script.
- Supprt Linux/Mac