Automatically deploys a node app using Cloud Init (also called Cloud Config). Cloud Init works on:
Just git clone
this repo and run yarn install
(or npm install
) to fetch dependencies.
-
Edit
config.js
and runnode 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 [email protected]: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.
This is the first release of the Cloud Config generator. Bug reports are good, but pull requests are better. 🙂
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!