Added update script
This commit is contained in:
13
scripts/update
Normal file
13
scripts/update
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
git pull && echo "Pulled the latest changes"
|
||||||
|
|
||||||
|
if [ "$1" == "clear" ]; then
|
||||||
|
docker-compose down && echo "Shutted down the bot"
|
||||||
|
docker image rm node-cache && echo "Removed the cache"
|
||||||
|
docker image rm illegitimate && echo "Removed the bot image"
|
||||||
|
docker images | grep "<none>" | awk -F" " '{print $3}' | xargs -I {} docker image rm {} && echo "Removed all dangling images"
|
||||||
|
docker build . -f Dockerfile.cache -t node-cach && echo "Rebuilt the cache"
|
||||||
|
fi
|
||||||
|
|
||||||
|
docker-compose up -d --build && echo "Started the bot"
|
||||||
Reference in New Issue
Block a user