summaryrefslogtreecommitdiff
path: root/scripts/deploy.sh
blob: bd78599fef5aaf96b1f2cbf8dd4cb3bd3d5fb568 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

DIR="$(cd "$(dirname "$0")" && pwd)"
STATUS="Status: Downloaded newer image for blindsidenetwks/scalelite:latest"

new_status=$(sudo docker pull blindsidenetwks/scalelite:latest | grep Status:)

echo $new_status

if [ "$STATUS" == "$new_status" ]
then
  cd $DIR/..
  docker-compose down
  docker rmi $(docker images -f dangling=true -q)
  docker-compose up -d
fi

exit 0