diff --git a/scripts/ecosystem.config.json b/scripts/ecosystem.config.json new file mode 100644 index 0000000000000000000000000000000000000000..8e35d1837e3f1160f0cadc990901b5282419984c --- /dev/null +++ b/scripts/ecosystem.config.json @@ -0,0 +1,10 @@ +{ + "apps": [ + { + "script": "../server/index.js", + "name": "tv-panel", + "instances": "1", + "exec_mode": "cluster" + } + ] +} diff --git a/scripts/update_server.sh b/scripts/update_server.sh new file mode 100644 index 0000000000000000000000000000000000000000..326c5a88100524bb45b477aa91e4d3a0582c4f9f --- /dev/null +++ b/scripts/update_server.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +CWD=$(pwd) + +DIRECTORY=$(cd `dirname $0` && pwd) +cd $DIRECTORY + +# Pull code +git fetch +# git reset --hard origin/master + +# Install deps +cd ../ +yarn install --pure-lockfile + +# Build front +yarn build:front + +# Restart server +cd scripts +pm2 startOrRestart ecosystem.config.json + +cd $CWD