Answer the question
In order to leave comments, you need to log in
How to automate the process of uploading versions of a nodeJS application?
I looked at various questions and googled, but still I turn to you, I will describe the situation. There is an application (website) written on node, and using the cluster module to run on prod (maybe this somehow affects the operation of things like pm or forever, I don’t know yet). All tested on development machines with Windows, cluster works well in tandem with nginx. In general, everything seems to be OK with us, now it's time to put this creation on the prod server (there we host sites in php with apache + nginx, while node was not even installed there).
The project is stored on a server with gitalb, where development is carried out.
Option 1: It is necessary that the push field to the master branch triggers a hook that pulls "something" (you can write a sh script that unpacks the branch into the desired folder, but I don't know how correct this is), which will update the files in the project directory, and immediately restart the working server (for example, force forever to restart our application).
Obviously, this option is bad, especially if this application is running on several different machines. And then option 2:
No hooks, you need "something" with a web interface, and a simple config (such as specifying the repo address, authorization data, the desired branch). We press some thread of the "Deploy" button and the project files are updated, the application is restarted, profit.
What do you advise to do? And it is better to click on visual examples, with details.
Answer the question
In order to leave comments, you need to log in
CI tools to help you. Build the application in .deb/.rpm via Jenkins and fpm, copy it to the server via scp and install it there. preinstall/postinstall scripts are supported by packages.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question