I'm brand new to CI/CD and need some guidance on how to deploy a small web application to a cloud machine.
My web application is built using Webpack 2. The resulting files are served through a Node webserver, and requires two additional Node webservers to work (backend APIs). All three Node webservers are in the same git repo and are covered by the same package.json file.
Each time I commit code it triggers Travis to build and test the code. When my commit passes Travis and I decide to deploy the application I go through the following steps
- ssh to my remote machine
- stop all the three NodeJS webservers I have running in screens
git pull
to get the most recent changesnpm install
to install the applicationnpm run build
to run a build command generating the files to serve- start all three node servers in screens again
I want to automate this process, so that each passed commit gets deployed. Or even better, so that I can select which build to deploy after it passed Travis through some UI.
I understand there are tons of tools ranging from Chef to Docker to do this. I'm looking for a reasonably simple solution and I'm open to learning new things. My cloud provider is currently Linode, but I prefer a solution where the cloud provider doesn't matter. I've really tried to find a good existing question like this, but was surprised that I couldn't find one.