remove update script

This commit is contained in:
Simon Larsen
2022-11-10 11:39:06 +00:00
parent 08b045a90d
commit 5d18ff966e
2 changed files with 16 additions and 41 deletions

View File

@@ -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

View File

@@ -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!"