diff --git a/install.sh b/install.sh index 8d22a19218..40985fbbce 100755 --- a/install.sh +++ b/install.sh @@ -4,12 +4,22 @@ set -e bash preinstall.sh -# If docker-compose is installed and if docker-compose.yml is found then, stop the stack. -if [[ $(which docker-compose) ]]; then - if [ -f ./docker-compose.yml ]; then - sudo -E docker-compose -f docker-compose.yml stop || true - fi -fi + + +# Revert all local changes +git reset +git checkout . + +# Pull latest changes +git pull + +docker-compose pull + +echo "Stopping the stack!" +sudo -E docker-compose -f docker-compose.yml stop || true + +# echo "Checking if async migrations are up to date" +# sudo -E docker-compose run init npm run start diff --git a/update.sh b/update.sh deleted file mode 100644 index 20af4c5e12..0000000000 --- a/update.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash - -set -e - -echo "Updating OneUptime. This will cause a few minutes of downtime. If you would like to avoid downtime, please consider installing this on a Kubernetes cluster." -read -r -p "Do you want to update OneUptime? [y/N] " response -if [[ "$response" =~ ^([yY][eE][sS]|[yY])+$ ]] -then - echo "OK!" -else - exit -fi - -bash preinstall.sh - -# Revert all local changes -git reset -git checkout . - -# Pull latest changes -git pull - -docker-compose pull - -echo "Stopping the stack!" -docker-compose stop - -# echo "Checking if async migrations are up to date" -# sudo -E docker-compose run init - -echo "OK, Restarting the stack!" -npm run start - - -echo "OneUptime updated successfully!" \ No newline at end of file