Commit cb404c3b authored by Alexander Sachs's avatar Alexander Sachs

fixed automatic deployment

parent a9ca36ae
Pipeline #35637 failed with stages
in 1 minute and 39 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_backend/
# 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
# 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_backend/
# clone the repo again
echo "clone the repo"
git clone
# 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 rtls_backend/bin/www
......@@ -8,7 +8,7 @@ const axios = require('axios')
/* GET home page. */
router.get('/', function(req, res, next) {
res.render('index', {
title: 'RTLS 3.0 RWTH Aachen codecentric'
title: 'Enterprise Trust Chain'
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