Answer the question
In order to leave comments, you need to log in
How to launch forever after pushing to a specific branch?
There is gitlab, you need to execute such a bash script after pushing, for example, to the master branch
#!/bin/bash
git archive --remote=/repositories/myproject.git master | tar -x -C /www/myproject/
forever stop "myproject"
cd /www/myproject
export NODE_PATH=.
export NODE_ENV=qa
export NODE_INIT_TARGET=build
node --use_strict bin/init
forever start -a --uid "myproject" --minUptime 5000 --spinSleepTime 5000 bin/start --use_strict
exit 0
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question