Automate Meteor deployments on Azure App Service
- Meteor 1.4+
- App Service on Basic plan or higher
- Following General Settings:
- Web sockets - On
- ARR Affinity - On
- Following App Settings:
- SCM_COMMAND_IDLE_TIMEOUT - 3600
- MONGO_URL - (MongoDB connection string)
- MONGO_OPLOG_URL - (Optional: Recommended with multiple instances)
- ROOT_URL - http://{sitename}.azurewebsites.net or your custom domain if you've set that up
- METEOR_SETTINGS - (Optional: e.g from your settings.json)
- WEBSITE_NODE_DEFAULT_VERSION - (Node version bundled with your current Meteor release)
- METEOR_AZURE_NPM_VERSION - (NPM version bundled with your current Meteor release)
- Copy the contents of the
script
directory into the top-level of your repository - Configure a deployment source in the Azure portal (detailed instructions)
Meteor's core force-ssl package is incompatible with our setup. You can achieve the same functionality with an extra rewrite rule in your web.config (see a full example here):
<!-- Force HTTPS -->
<rule name="Redirect to HTTPS" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
</rule>
Note that with this approach ROOT_URL should be prefixed with 'https' (if not already)
See the meteor-azure-example repo