Compare commits

..

1 Commits

Author SHA1 Message Date
mercury 46d54ffeee fix gitignore 2024-03-03 19:45:57 +04:00
2 changed files with 21 additions and 1 deletions
+2 -1
View File
@@ -16,4 +16,5 @@
.vscode/
.idea/
mirror/.env
update/
update/*
!update/update.sh
+19
View File
@@ -0,0 +1,19 @@
#!/bin/bash
pwd=`pwd`
> $pwd/update/pipe
echo "$$" > $pwd/update/update_pid
while true
do
cmd=$(cat $pwd/update/pipe)
if [[ -n "$cmd" ]]
then
docker compose down --remove-orphans
git reset --hard
git pull > ./update/message
IP=$(ip -4 addr | sed -ne 's|^.* inet \([^/]*\)/.* scope global.*$|\1|p' | awk '{print $1}' | head -1) VER=$(git describe --tags) docker compose up -d --force-recreate
bash $pwd/update/update.sh &
exit 0
fi
sleep 1
done