Commit 2dc68e68 authored by Alexander Sachs's avatar Alexander Sachs

fixed automatic deployment

parent ae89a95c
Pipeline #35645 failed with stages
in 5 minutes and 55 seconds
......@@ -3,21 +3,24 @@
# any future command that fails will exit the script
set -e
# Delete the old repo
rm -rf /home/ubuntu/rtls_frontend/
# Install dependencies if they are missing
which git || (sudo apt-get update -yq --fix-missing && sudo apt-get install -yq git-core)
which npm || (sudo apt-get update -yq --fix-missing && sudo apt-get install -yq npm)
which nvm || (sudo npm install nvm -g)
which pm2 || (sudo npm install pm2 -g)
# clone the repo again
git clone https://gitlab.codecentric.de/RWTH_RTLS_BC/rtls_frontend.git
# stop the previous pm2
echo "Killing previous node instances"
pm2 kill
# Delete the old repo
echo "Delete the old repo"
rm -rf /home/ubuntu/rtls_frontend/
# clone the repo again
echo "clone the repo"
git clone https://gitlab.codecentric.de/RWTH_RTLS_BC/rtls_frontend.git
# starting pm2 daemon
pm2 status
......@@ -28,4 +31,5 @@ echo "Running npm install"
npm install
#Restart the node server
npm start
echo "Starting the server with pm2"
pm2 start webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment