Simple node.js app deployment on DigitalOcean from GitHub

你说的曾经没有我的故事 提交于 2019-12-01 01:17:52

It will not be as easy with Heroku. It is always tempting to use cheaper services like Digital Ocean or Vultr and pay only fraction of the price (especially using coupon links that can make it free for months - Digital Ocean, Vultr) but having your own VPS means that you need to manage it yourself. Simplifying that process is what you pay for when you're using Heroku. But it doesn't have to be that bad.

Here is a good tutorial on how to do it:

And see this list of tutorials - search for those with "deploy" in the title:

Basically you have few options that I would consider here:

  1. A semi-manual deploy with git - You can install a git server on your VPS and push to it whenever you want to deploy a new version

  2. Automatic deploy with git - You can add a deployment process to you CI scripts that will do what you do manually in (1) but after all tests pass

  3. You can trigger a pull from git on the server with ssh or a custom API

  4. You can do (3) in your CI scripts

  5. You can add a custom webhook in GitHub to notify your server about new version and your server may then pull the code and restart

  6. You can add a custom webhook in CI and do the same as in (5)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!