Back to Sails

Hosting

docs/concepts/Deployment/Hosting.md

12.12.20009.0 KB
Original Source

Hosting

Here is a non-comprehensive list of Node/Sails hosting providers and a few available community tutorials. Keep in mind that, most of the time, the process for deploying your Sails app is exactly the same as it would be for any other Node.js app. Just be sure to take a look at the other pages in this section of the docs (as well as your app's config/env/production.js file) and make any necessary adjustments before you actually deploy to production.

Heroku

<a title="Deploy your Sails/Node.js app on Heroku" href="http://heroku.com"></a>

Heroku offers easy, free deployment for any Sails project generated using the Web App template:

  1. Create a GitHub repo and push your code up to the master branch.
  2. Create a Heroku pipeline and a staging app within that pipeline (e.g. my-cool-site-staging).
  3. Using the point-and-click interface, set up that staging app to auto-deploy from the deploy branch of your GitHub repo.
  4. Under "Add-ons", set up Papertrail for logging, Redis2Go as your production session store (and for delivering socket messages, if relevant), Heroku Scheduler for scheduled jobs (if relevant), and a database host of your choosing (e.g. MySQL, PostgreSQL, MongoDB).
  5. Run through config/production.js and config/staging.js in your project and set it up. Any information you feel is too sensitive to hard-code into those files (like database credentials) can be stored in Heroku's config vars (see bundled config files for examples).
  6. In the terminal, make sure you've got everything pulled/pushed and are fully in sync with the remote master branch on GitHub.
  7. Deploy by typing sails run deploy.

You can see a demonstration of this in action here.

More resources for using Heroku with Node.js/Sails.js:
<!-- More 2013: + [StackOverflow: Sails.js + Heroku (2013)](http://stackoverflow.com/a/20184907/486547) + https://groups.google.com/forum/#!topic/sailsjs/vgqJFr7maSY + https://github.com/chadn/heroku-sails + http://dennisrongo.com/deploying-sails-js-to-heroku -->

Microsoft Azure

<a title="Deploy a Sails.js web app to Azure App Service" href="https://docs.microsoft.com/en-us/azure/app-service-web/app-service-web-nodejs-sails"></a>

<!-- + [Deploying Sails.js to Azure Web Apps (2015)](https://blogs.msdn.microsoft.com/partnercatalystteam/2015/07/16/y-combinator-collaboration-deploying-sailsjs-to-azure-web-apps/) PAGE NOT FOUND -->

Google Cloud Platform

<a title="Deploy your Sails/Node.js app to Google Cloud Platform" href="https://cloud.google.com/nodejs/resources/frameworks/sails"></a>

Using Google Cloud Platform means that your apps run on the same infrastructure that powers all of Google's products, so you can be confident that they'll scale seamlessly—no matter how many users you have.

<!-- + [Deploying Sails.js to Google Cloud (2016)](http://www.mot.la/2016-06-04-deploying-sails-js-to-google-cloud.html) PAGE NOT FOUND -->

DigitalOcean

<a title="DigitalOcean" href="https://aws.amazon.com/"></a>

<!-- More 2013: + https://www.digitalocean.com/community/articles/how-to-host-multiple-node-js-applications-on-a-single-vps-with-nginx-forever-and-crontab -->

Amazon Web Services (AWS)

<a title="Amazon Web Services (AWS)" href="https://aws.amazon.com/"></a>

PM2 (KeyMetrics)

<a title="About PM2" href="http://pm2.keymetrics.io/"></a>

Note: PM2 isn't really a hosting platform, but it's worth mentioning in this section just so you're aware of it.

OpenShift (Red Hat)

<a href="https://www.openshift.com/"></a>

<!-- ### Xervo (formerly Modulus) <a href="https://xervo.io">&nbsp; &nbsp;</a> + [Customer Spotlight: Sails.js](https://blog.xervo.io/sails-js) -->

Nanobox

exoscale / CloudControl

RoseHosting

More options

<docmeta name="displayName" value="Hosting">