Deploy a nodejs App via ssh to multiple servers (server after server - not parallel). How can I do that?


I am looking for a solution with which I can deploy multiple servers (servers after server - not parallel) with a new nodejs app. I have multiple VPS and all of them are empty (only the OS is installed). This means how can I install nodejs with circleci and deploy the app at the same time and if deploy how can I restart nodejs to serve the new code? Should I use docker for the empty VPS?

Thank you for your help.


Do whatever you do for automated deploys from your dev machine console. At its most basic, this is usually creating a tarball, scping it into a remote temporary folder, using ssh to unpack it remotely, and then using ssh to copy it over the old app remotely.

For some languages you also need to do a soft restart on the server, not sure if that is the case with Node.

If you don’t have this in place already, try getting that to work locally first. You can then implement it in CircleCI when you are happy with it.