From 1617296db3c7ffd5831cb077c92bb71e8d14a196 Mon Sep 17 00:00:00 2001 From: HardiReady Date: Sat, 24 Feb 2018 14:06:07 +0100 Subject: [PATCH] fix pm2 setup and execution from auto init script --- docs/infra/3rd-party-install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) mode change 100644 => 100755 docs/infra/3rd-party-install.sh diff --git a/docs/infra/3rd-party-install.sh b/docs/infra/3rd-party-install.sh old mode 100644 new mode 100755 index 957320a..7319744 --- a/docs/infra/3rd-party-install.sh +++ b/docs/infra/3rd-party-install.sh @@ -26,13 +26,16 @@ sudo systemctl enable mongod.service wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash source ~/.nvm/nvm.sh nvm install stable -sudo ln -s ~/.nvm/versions/node/$(node -v)/bin/node /usr/bin/node +sudo ln -sf ~/.nvm/versions/node/$(node -v)/bin/node /usr/bin/node # upgrade to latest npm version sudo npm install -g npm@latest if [ "${1}" == "prod" ]; then + cd ./../.. + npm install + npm run deploy-static:prod sudo npm install -g pm2 - pm2 start ./../../pm2-start.json + pm2 start pm2-start.json pm2 startup systemd fi