/deploy-node-on-linux

Generate a Cloud Init file to deploy a node app on Linux. Works with all major cloud providers.

Primary LanguageJavaScript

Deploy node on Linux

Automatically deploys a node app using Cloud Init (also called Cloud Config). Cloud Init works on:

Installation

Just git clone this repo and run yarn install (or npm install) to fetch dependencies.

Usage

  • Edit config.js and run node make-cloud-init.js to output a Cloud Init file.

  • Start an instance (via API or manually) on your cloud provider and specify the Cloud Init file as User Data.

  • After the box is built, SSH in as your chosen user, on your chosen port. You might wish to check the output of the Cloud Init in /var/log/cloud-init-output.log. Add the contents of ~/.ssh/id_rsa.pub as a deploy key to your project on GitHub (Settings then Deploy Keys) or GitLab.

You now have a fully deployed box and can cd /var/www, then git clone git@github.com:yourorg/someproject.git, run yarn install, and start your app with systemctl start (app name).

See CertSimple's Deploy Node on Linux guide for full documentation.

We welcome forks and changes!

This is the first release of the Cloud Config generator. Bug reports are good, but pull requests are better. 🙂

Credits

Deploy Node on Linux is created by Fast, painless EV HTTPS provider CertSimple. If you want to verify who runs your website, we do it better than anyone else!