Reputation: 31
I have multiple servers on a load balanced environment running the same Node application. I want the code on these servers be the same everywhere. I currently maintain a git repo for the code on these servers but have to manually SSH into each of these and pull the code from the git repo. Is there any simple way I can push the code onto all the servers?
Upvotes: 0
Views: 234
Reputation: 3839
It looks your question is how to deploy Node.js app into multiple server. Here related question
Upvotes: 1
Reputation: 6160
Straightforward solutions that came in my mind:
1) use a cron
job on the servers that makes the work you're doing manually, i.e., git pull (need linux), or
2) use git hooks
to trigger the pull on the other servers. With this solution you need to have the list of servers to trigger the update. Hooks are basically scripts that are executed before/after events like commits, push, etc.
Upvotes: 1