summaryrefslogtreecommitdiff
path: root/scripts/deploy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/deploy.sh')
-rwxr-xr-xscripts/deploy.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/deploy.sh b/scripts/deploy.sh
new file mode 100755
index 0000000..2a6a42d
--- /dev/null
+++ b/scripts/deploy.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+STATUS="Status: Downloaded newer image for blindsidenetwks/scalelite:master"
+
+new_status=$(sudo docker pull blindsidenetwks/scalelite:master | grep Status:)
+
+echo $new_status
+
+if [ "$STATUS" == "$new_status" ]
+then
+ cd /home/ubuntu/scalelite-run
+ sudo docker-compose down
+ sudo docker rmi $(sudo docker images -f dangling=true -q)
+ sudo docker-compose up -d
+fi
+
+exit 0